The `unlock-object` operation was O(N) with N currently locked objects
--- so, O(N^2) to lock N objects and then unlock them --- because
locked objects were stored in and searched in a global list. Also, GC
was O(N) at any generation with N locked objects across generations,
since every locked object was scanned.
Fix these poblems so that locking and unlocking is practically O(1)
and GC is not poportional to locked objects. More precisely, locking
and unlocking is now O(C) for locking an individual object C times to
be balanced by C unlocks. (Since multiple locks on a single object
is rare, this performance seems good enough.)
The implementation replaces the global list with segment-specific
lists. Backpointers are managed using the general generational
support, so that unmodified, old-generation locked objects do not
need to be swept duing a new-generation collection.
original commit: a57d256ca73a3d507792c471facb7e35afbe88b3
been seen on the pending list rather than the trigger lists.
gc.c
removed scan of space_ephemeron from check_heap because check_heap
as written can't handle the two link fields properly.
gcwrapper.c
in the ephemerons mat that checks interaction between mutation and
collection, added generation arguments to the first two collect
calls so they always collect into the intended generation.
4.ms
updated allx and bullyx patches
patch*
original commit: 43b54f64949cf992e52cf18bacc2a09f4a199227