summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-12-04 17:47:41 +0100
committerGitHub <noreply@github.com>2020-12-04 17:47:41 +0100
commitedce5897a52aac308fbe9b14f155139f15da02cd (patch)
treeb939a2c63eae16ec325ae747cdfc4cc8420247b3 /lib
parent6877e0c8a3881e86ed40ddac3acba8926c8fc6ca (diff)
downloadNim-edce5897a52aac308fbe9b14f155139f15da02cd.tar.gz
fixes #16214 [backport] (#16252)
Diffstat (limited to 'lib')
-rw-r--r--lib/system/alloc.nim8
-rw-r--r--lib/system/mmdisp.nim8
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim
index 95658c49a..76c744f59 100644
--- a/lib/system/alloc.nim
+++ b/lib/system/alloc.nim
@@ -253,7 +253,7 @@ proc llAlloc(a: var MemRegion, size: int): pointer =
     sysAssert roundup(size+sizeof(LLChunk), PageSize) == PageSize, "roundup 6"
     var old = a.llmem # can be nil and is correct with nil
     a.llmem = cast[PLLChunk](osAllocPages(PageSize))
-    when defined(avlcorruption):
+    when defined(nimAvlcorruption):
       trackLocation(a.llmem, PageSize)
     incCurrMem(a, PageSize)
     a.llmem.size = PageSize - sizeof(LLChunk)
@@ -276,7 +276,7 @@ proc allocAvlNode(a: var MemRegion, key, upperBound: int): PAvlNode =
     a.freeAvlNodes = a.freeAvlNodes.link[0]
   else:
     result = cast[PAvlNode](llAlloc(a, sizeof(AvlNode)))
-    when defined(avlcorruption):
+    when defined(nimAvlcorruption):
       cprintf("tracking location: %p\n", result)
   result.key = key
   result.upperBound = upperBound
@@ -284,7 +284,7 @@ proc allocAvlNode(a: var MemRegion, key, upperBound: int): PAvlNode =
   result.link[0] = bottom
   result.link[1] = bottom
   result.level = 1
-  #when defined(avlcorruption):
+  #when defined(nimAvlcorruption):
   #  track("allocAvlNode", result, sizeof(AvlNode))
   sysAssert(bottom == addr(a.bottomData), "bottom data")
   sysAssert(bottom.link[0] == bottom, "bottom link[0]")
@@ -1017,7 +1017,7 @@ when defined(nimTypeNames):
 template instantiateForRegion(allocator: untyped) {.dirty.} =
   {.push stackTrace: off.}
 
-  when defined(fulldebug):
+  when defined(nimFulldebug):
     proc interiorAllocatedPtr*(p: pointer): pointer =
       result = interiorAllocatedPtr(allocator, p)
 
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim
index 5fe1960d1..8589b678d 100644
--- a/lib/system/mmdisp.nim
+++ b/lib/system/mmdisp.nim
@@ -17,10 +17,10 @@ const
   debugGC = false # we wish to debug the GC...
   logGC = false
   traceGC = false # extensive debugging
-  alwaysCycleGC = defined(smokeCycles)
-  alwaysGC = defined(fulldebug) # collect after every memory
+  alwaysCycleGC = defined(nimSmokeCycles)
+  alwaysGC = defined(nimFulldebug) # collect after every memory
                                 # allocation (for debugging)
-  leakDetector = defined(leakDetector)
+  leakDetector = defined(nimLeakDetector)
   overwriteFree = defined(nimBurnFree) # overwrite memory with 0xFF before free
   trackAllocationSource = leakDetector
 
@@ -30,7 +30,7 @@ const
   coalescRight = true
   coalescLeft = true
   logAlloc = false
-  useCellIds = defined(corruption)
+  useCellIds = defined(nimCorruption)
 
 type
   PPointer = ptr pointer