few notes about the remaining problems with retired buffers

This commit is contained in:
Zahary Karadjov 2013-01-27 22:23:57 +02:00
commit 67f37264b3
2 changed files with 8 additions and 2 deletions

View file

@ -346,6 +346,7 @@ when traceGC:
cfprintf(cstdout, "Allocations: %ld; freed: %ld\n", a, f)
template gcTrace(cell, state: expr): stmt {.immediate.} =
when logGC: writeCell($state, cell)
when traceGC: traceCell(cell, state)
template WithHeapLock(blk: stmt): stmt =
@ -994,7 +995,7 @@ proc gcMark(gch: var TGcHeap, p: pointer) {.inline.} =
var objStart = cast[PCell](interiorAllocatedPtr(gch.region, cell))
if objStart != nil:
# mark the cell:
if objStart.isBitDown(rcReallyDead):
if objStart.color != rcReallyDead:
if gcDebugging:
# writeCell("marking ", objStart)
else: