diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/system/alloc.nim | 3 | ||||
-rw-r--r-- | lib/system/gc_ms.nim | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index 55e1c26a7..7b52780fe 100755 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -319,7 +319,8 @@ iterator allObjects(m: TMemRegion): pointer {.inline.} = let size = c.size var a = cast[TAddress](addr(c.data)) - while a <% c.acc: + let limit = a + c.acc + while a <% limit: yield cast[pointer](a) a = a +% size else: diff --git a/lib/system/gc_ms.nim b/lib/system/gc_ms.nim index 15975c035..9ebc27a9f 100644 --- a/lib/system/gc_ms.nim +++ b/lib/system/gc_ms.nim @@ -13,7 +13,9 @@ const InitialThreshold = 4*1024*1024 # X MB because marking&sweeping is slow - withBitvectors = defined(gcUseBitvectors) + withBitvectors = defined(gcUseBitvectors) + # bitvectors are significantly faster for GC-bench, but slower for + # bootstrapping and use more memory rcWhite = 0 rcGrey = 1 # unused rcBlack = 2 |