fixes #3558
This commit is contained in:
parent
06854d1346
commit
4a7266e1c1
2 changed files with 17 additions and 15 deletions
|
|
@ -301,13 +301,14 @@ proc pageAddr(p: pointer): PChunk {.inline.} =
|
||||||
result = cast[PChunk](cast[ByteAddress](p) and not PageMask)
|
result = cast[PChunk](cast[ByteAddress](p) and not PageMask)
|
||||||
#sysAssert(Contains(allocator.chunkStarts, pageIndex(result)))
|
#sysAssert(Contains(allocator.chunkStarts, pageIndex(result)))
|
||||||
|
|
||||||
proc writeFreeList(a: MemRegion) =
|
when false:
|
||||||
var it = a.freeChunksList
|
proc writeFreeList(a: MemRegion) =
|
||||||
c_fprintf(stdout, "freeChunksList: %p\n", it)
|
var it = a.freeChunksList
|
||||||
while it != nil:
|
c_fprintf(stdout, "freeChunksList: %p\n", it)
|
||||||
c_fprintf(stdout, "it: %p, next: %p, prev: %p, size: %ld\n",
|
while it != nil:
|
||||||
it, it.next, it.prev, it.size)
|
c_fprintf(stdout, "it: %p, next: %p, prev: %p, size: %ld\n",
|
||||||
it = it.next
|
it, it.next, it.prev, it.size)
|
||||||
|
it = it.next
|
||||||
|
|
||||||
const nimMaxHeap {.intdefine.} = 0
|
const nimMaxHeap {.intdefine.} = 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -155,14 +155,15 @@ template setColor(c, col) =
|
||||||
else:
|
else:
|
||||||
c.refcount = c.refcount and not colorMask or col
|
c.refcount = c.refcount and not colorMask or col
|
||||||
|
|
||||||
proc writeCell(msg: cstring, c: PCell) =
|
when defined(logGC):
|
||||||
var kind = -1
|
proc writeCell(msg: cstring, c: PCell) =
|
||||||
var typName: cstring = "nil"
|
var kind = -1
|
||||||
if c.typ != nil:
|
var typName: cstring = "nil"
|
||||||
kind = ord(c.typ.kind)
|
if c.typ != nil:
|
||||||
when defined(nimTypeNames):
|
kind = ord(c.typ.kind)
|
||||||
if not c.typ.name.isNil:
|
when defined(nimTypeNames):
|
||||||
typName = c.typ.name
|
if not c.typ.name.isNil:
|
||||||
|
typName = c.typ.name
|
||||||
|
|
||||||
when leakDetector:
|
when leakDetector:
|
||||||
c_fprintf(stdout, "[GC] %s: %p %d %s rc=%ld from %s(%ld)\n",
|
c_fprintf(stdout, "[GC] %s: %p %d %s rc=%ld from %s(%ld)\n",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue