-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve provenance of capability to heap block
(a cherry-pick of commits ab69d29, d8ecfa3, c81f06e, 8c8c740, 403baec, 71cc392 partly from capablevms/bdwgc) Issue #627 (bdwgc). Original capability should be used to reclaim memory (and during explicit object free) rather than a computed integer value for the capability systems. * allchblk.c (GC_get_first_part): Set rest_hdr->hb_block value (i.e., add hblk pointer within header during re-allocation of GC'd memory). * dbg_mlc.c [!SHORT_DBG_HDRS] (GC_check_heap_block): Add assertion that p is equal to hhdr->hb_block. * headers.c (GC_apply_to_all_blocks): Pass hhdr->hb_block (instead of HBLK_ADDR(bi,j)) to fn(). * headers.c (GC_apply_to_all_blocks, GC_next_block): Add assertion that HBLK_ADDR(bi,j) is equal to ADDR(hhdr->hb_block). * headers.c (GC_next_block): Return hhdr->hb_block instead of HBLK_ADDR(bi,j). * headers.c (GC_prev_block): Add TODO item to return hhdr->hb_block and add the corresponding assertion (as in GC_next_block). * malloc.c (free_internal): Pass hhdr->hb_block (instead of HBLKPTR(p)) to GC_freehblk(); add assertion that ADDR(HBLKPTR(p)) is equal to ADDR(hhdr->hb_block). * reclaim.c (GC_reclaim_small_nonempty_block, GC_reclaim_block): Add assertion that hbp is equal to hhdr->hb_block. Co-authored-by: Ivan Maidanski <ivmai@mail.ru>
- Loading branch information
Showing
5 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters