mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
* fix #10488 GC memory leak regression * re-enable gch.stack.bottom.repr but only inside when defined(logGC)
This commit is contained in:
committed by
Andreas Rumpf
parent
b2a5195e92
commit
e98bd3aceb
@@ -864,7 +864,10 @@ when not defined(useNimRtl):
|
||||
for stack in items(gch.stack):
|
||||
result.add "[GC] stack " & stack.bottom.repr & "[GC] max stack size " & cast[pointer](stack.maxStackSize).repr & "\n"
|
||||
else:
|
||||
result.add "[GC] stack bottom: " & gch.stack.bottom.repr
|
||||
# this caused memory leaks, see #10488 ; find a way without `repr`
|
||||
# maybe using a local copy of strutils.toHex or snprintf
|
||||
when defined(logGC):
|
||||
result.add "[GC] stack bottom: " & gch.stack.bottom.repr
|
||||
result.add "[GC] max stack size: " & $gch.stat.maxStackSize & "\n"
|
||||
|
||||
{.pop.} # profiler: off, stackTrace: off
|
||||
|
||||
Reference in New Issue
Block a user