Fix ImmixSpace liveness check
Fix ImmixSpace's is_live and get_forwarded_object for https://github.com/mmtk/mmtk-openjdk/pull/141 .
The context of this PR:
OpenJDK has several object cache (or storage) that should be processed during GC. For example, CodeCache may contain embedded pointers. Our old approach is to treat all the objects in these storages as root pointers -- and caused memory leak. https://github.com/mmtk/mmtk-openjdk/pull/141 tries to update these storages before the end of each GC, including removing dead objects and updating forwarded objects.
To support this. all mmtk spaces should implement is_live and get_forwarded_object correctly.
@tianleq Looks like there's some difficulty implementing get_forwarded_object for MarkCompactSpace? Is it because the MarkCompactSpace does not use object_forwarding?
TODO: MarkCompactSpace needs to be fixed as well...
Yes, markcompact moves objects through a linear scan
get_forwarded_object is fixed in https://github.com/mmtk/mmtk-core/pull/753 for ImmixSpace. Setting mark bit in Immix post_copy is included in master.
https://github.com/mmtk/mmtk-core/blob/5b48f8ad2e62043344942e3d88e59b6fd8d26afc/src/policy/immix/immixspace.rs#L776-L783
We can close this PR.