Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from MatthewFluet/heap-predicates
Fix heap invariant predicates Previously, the `isPointerInOldGen` and `isPointerInNursery` predicates checked that the object pointer is strictly less than `s->heap.start + s->heap.oldGenSize` and `s->frontier`, respectively. With #219 (forward pointer in header), 0-byte objects are allowed and the above checks are insufficient. In particular, immediately after allocating a 0-byte object, the object pointer is equal to the frontier. Now (381a47e and 437cdaa), the `isPointerInOldGen` and `isPointerInNursery` predicates are revised to check that the pointer less than or equal to `s->heap.start + s->heap.oldGenSize` and `s->frontier`, respectively. Previously, the `GC_memmove` function asserted that the src, dst, and size values were aligned. With #192 (array copy prims) a GC_memmove may be invoked with arbitrary src, dst, and size values. Now (30a3968), the `GC_memmove` function does not assert alignment for src, dst, and size. For consistency, neither does `GC_memcpy`.
- Loading branch information
Showing
5 changed files
with
35 additions
and
23 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