diff options
author | Andreas Rumpf <andreasrumpf@noname> | 2009-09-15 23:22:22 +0200 |
---|---|---|
committer | Andreas Rumpf <andreasrumpf@noname> | 2009-09-15 23:22:22 +0200 |
commit | 66a7e3d37c0303997a6b1a3b7ec263dfb8c07748 (patch) | |
tree | 40ae1ab8aeb9086b7310ea73ab8a2ed6b597f88b /lib/system/gc.nim | |
parent | 300430fbba28b408f7ac86ca46b03d9d50839399 (diff) | |
download | Nim-66a7e3d37c0303997a6b1a3b7ec263dfb8c07748.tar.gz |
added tools and web dirs
Diffstat (limited to 'lib/system/gc.nim')
-rwxr-xr-x[-rw-r--r--] | lib/system/gc.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index f91b8843e..da8f75768 100644..100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -468,10 +468,10 @@ proc collectCycles(gch: var TGcHeap) = Init(gch.cycleRoots) proc gcMark(p: pointer) {.inline.} = - # the addresses are not as objects on the stack, so turn them to objects: + # the addresses are not as cells on the stack, so turn them to cells: var cell = usrToCell(p) var c = cast[TAddress](cell) - if c >% PageSize: + if c >% PageSize and (c and (MemAlign-1)) == 0: # fast check: does it look like a cell? if isAllocatedPtr(allocator, cell): # mark the cell: @@ -585,7 +585,7 @@ proc CollectZCT(gch: var TGcHeap) = # it has not been removed yet from the ZCT. This is because # ``incref`` does not bother to remove the cell from the ZCT # as this might be too slow. - # In any case, it should be removed from the ZCT. But not + # In any case, it should be removed from the ZCT. But not # freed. **KEEP THIS IN MIND WHEN MAKING THIS INCREMENTAL!** if canBeCycleRoot(c): excl(gch.cycleRoots, c) when logGC: writeCell("zct dealloc cell", c) |