Skip to content

Instantly share code, notes, and snippets.

@hotsphink
Created May 29, 2019 18:48
Show Gist options
  • Save hotsphink/1388820d97225ed777268616379a983e to your computer and use it in GitHub Desktop.
Save hotsphink/1388820d97225ed777268616379a983e to your computer and use it in GitHub Desktop.
mkgist-created gist
enqueueMark(obj|string)
Add an object to the queue of objects to mark at the beginning every GC. (Note
that the objects will actually be marked at the beginning of every slice, but
after the first slice they will already be marked so nothing will happen.)
Instead of an object, a few magic strings may be used:
'yield' - cause the current marking slice to end, as if the mark budget were
exceeded.
'enter-weak-marking-mode' - divide the list into two segments. The items after
this string will not be marked until we enter weak marking mode. Note that weak
marking mode may be entered zero or multiple times for one GC.
'abort-weak-marking-mode' - same as above, but then abort weak marking to fall back
on the old iterative marking code path.
'drain' - fully drain the mark stack before continuing.
'set-color-black' - force everything following in the mark queue to be marked black.
'set-color-gray' - continue with the regular GC until gray marking is possible, then force
everything following in the mark queue to be marked gray.
'unset-color' - stop forcing the mark color.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment