diff options
Diffstat (limited to 'rts/sm/NonMovingSweep.c')
-rw-r--r-- | rts/sm/NonMovingSweep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rts/sm/NonMovingSweep.c b/rts/sm/NonMovingSweep.c index 3ee27ef3b4..31a9041880 100644 --- a/rts/sm/NonMovingSweep.c +++ b/rts/sm/NonMovingSweep.c @@ -16,6 +16,7 @@ #include "Storage.h" #include "Trace.h" #include "StableName.h" +#include "CNF.h" // compactFree // On which list should a particular segment be placed? enum SweepResult { @@ -301,6 +302,21 @@ void nonmovingSweepLargeObjects() n_nonmoving_marked_large_blocks = 0; } +void nonmovingSweepCompactObjects() +{ + bdescr *next; + ACQUIRE_SM_LOCK; + for (bdescr *bd = nonmoving_compact_objects; bd; bd = next) { + next = bd->link; + compactFree(((StgCompactNFDataBlock*)bd->start)->owner); + } + RELEASE_SM_LOCK; + nonmoving_compact_objects = nonmoving_marked_compact_objects; + n_nonmoving_compact_blocks = n_nonmoving_marked_compact_blocks; + nonmoving_marked_compact_objects = NULL; + n_nonmoving_marked_compact_blocks = 0; +} + // Helper for nonmovingSweepStableNameTable. Essentially nonmovingIsAlive, // but works when the object died in moving heap, see // nonmovingSweepStableNameTable |