Skip to content

Conversation

@wks
Copy link
Collaborator

@wks wks commented Oct 12, 2023

DRAFT: This PR depends on cyclic marking state if forwarding bits are in the header.

Currently the forwarding bits is a 2-bits-per-object metadata, but it only has three states, namely "not triggered", "being forwarded" and "forwarded". Marking is supported by a separate marking bit. This PR uses the fourth state of the forwarding bits to represent the state that "the object is marked and should not move". With this change, Immix (and other GCs that do not evacuate all objects in a GC) will no longer need to "set the state to 'being forwarded' and then revert it if the object is marked". Instead, one CMPXCHG will be enough to atomically initiate forwarding as well as atomically mark an object, and fail if another thread is trying to mark or forward the same object.

wks added 2 commits October 12, 2023 16:58
The name is likely inherited from JikesRVM. But since we changed its name, we should just use the module name "object_forwarding" directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant