diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2020-04-10 02:36:24 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-14 23:31:01 -0400 |
commit | 15fa9bd6dd2d0b8d1fcd7135c85ea0d60853340d (patch) | |
tree | a171110ed89c9df0cb0f6bc5884b9e9353c26d7c /rts/sm/Sanity.c | |
parent | 41230e2601703df0233860be3f7d53f3a01bdbe5 (diff) | |
download | haskell-15fa9bd6dd2d0b8d1fcd7135c85ea0d60853340d.tar.gz |
rts: Expand and add more notes regarding slop
Diffstat (limited to 'rts/sm/Sanity.c')
-rw-r--r-- | rts/sm/Sanity.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 1c4c75514d..3ac926715a 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -475,7 +475,7 @@ void checkHeapChain (bdescr *bd) ASSERT( size >= MIN_PAYLOAD_SIZE + sizeofW(StgHeader) ); p += size; - /* skip over slop */ + /* skip over slop, see Note [slop on the heap] */ while (p < bd->free && (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } } @@ -796,12 +796,16 @@ static void checkGeneration (generation *gen, ASSERT(countBlocks(gen->large_objects) == gen->n_large_blocks); #if defined(THREADED_RTS) + // Note [heap sanity checking with SMP] + // // heap sanity checking doesn't work with SMP for two reasons: - // * we can't zero the slop (see Updates.h). However, we can sanity-check - // the heap after a major gc, because there is no slop. // - // * the nonmoving collector may be mutating its large object lists, unless we - // were in fact called by the nonmoving collector. + // * We can't zero the slop. However, we can sanity-check the heap after a + // major gc, because there is no slop. See also Updates.h and Note + // [zeroing slop when overwriting closures]. + // + // * The nonmoving collector may be mutating its large object lists, + // unless we were in fact called by the nonmoving collector. if (!after_major_gc) return; #endif |