diff options
Diffstat (limited to 'rts/sm/GC.c')
-rw-r--r-- | rts/sm/GC.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c index e0c8b05436..cfe4c6bdb5 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -215,6 +215,9 @@ GarbageCollect (rtsBool force_major_gc, // tell the STM to discard any cached closures it's hoping to re-use stmPreGCHook(); + // lock the StablePtr table + stablePtrPreGC(); + #ifdef DEBUG mutlist_MUTVARS = 0; mutlist_MUTARRS = 0; @@ -794,6 +797,9 @@ SET_GCT(gc_threads[0]); slop = calcLiveBlocks() * BLOCK_SIZE_W - live; stat_endGC(allocated, live, copied, N, max_copied, avg_copied, slop); + // unlock the StablePtr table + stablePtrPostGC(); + // Guess which generation we'll collect *next* time initialise_N(force_major_gc); |