Commit 5b0b83be authored by Simon Marlow's avatar Simon Marlow
Browse files

simplify processNurseryForDead

It wasn't actually broken, but it wasn't obviously right either.
parent 35c05d71
......@@ -172,21 +172,16 @@ processHeapForDead( bdescr *bd )
static void
processNurseryForDead( void )
{
StgPtr p, bdLimit;
StgPtr p;
bdescr *bd;
bd = MainCapability.r.rNursery->blocks;
while (bd->start < bd->free) {
p = bd->start;
bdLimit = bd->start + BLOCK_SIZE_W;
while (p < bd->free && p < bdLimit) {
p += processHeapClosureForDead((StgClosure *)p);
while (p < bd->free && p < bdLimit && !*p) // skip slop
p++;
}
bd = bd->link;
if (bd == NULL)
break;
for (bd = MainCapability.r.rNursery->blocks; bd != NULL; bd = bd->link) {
p = bd->start;
while (p < bd->free) {
while (p < bd->free && !*p) p++; // skip slop
if (p >= bd->free) break;
p += processHeapClosureForDead((StgClosure *)p);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment