fixes the recently discovered GC memory leaks

This revision is intended as comparison point between the old and the new GC
The used GC can be switched in mmdisp and various statistics will be gathered during
execution (these will be removed/disabled in later revisions)
This commit is contained in:
Zahary Karadjov 2012-12-05 20:42:19 +02:00
commit 083d4f4708
12 changed files with 1939 additions and 364 deletions

View file

@ -14,9 +14,9 @@
{.push checks:off.}
const
debugGC = false # we wish to debug the GC...
debugGC = true # we wish to debug the GC...
logGC = false
traceGC = false # extensive debugging
traceGC = true # extensive debugging
alwaysCycleGC = false
alwaysGC = false # collect after every memory allocation (for debugging)
leakDetector = false
@ -307,7 +307,10 @@ else:
include "system/cellsets"
when not leakDetector:
sysAssert(sizeof(TCell) == sizeof(TFreeCell), "sizeof TFreeCell")
include "system/gc"
when true:
include "system/gc"
else:
include "system/oldgc"
{.pop.}