summary refs log tree commit diff stats
path: root/lib/system/mmdisp.nim
diff options
context:
space:
mode:
authorcheatfate <ka@hardcore.kiev.ua>2016-09-20 17:34:36 +0300
committercheatfate <ka@hardcore.kiev.ua>2016-09-20 17:34:36 +0300
commitf0ea9447ce10b6b5262cedeeabe36ab39aed14f1 (patch)
tree454c833f0e2e545029eafe51026b27639ecec06d /lib/system/mmdisp.nim
parent09651bec5e0988a5f712049fdc0f9b41e7e37e98 (diff)
downloadNim-f0ea9447ce10b6b5262cedeeabe36ab39aed14f1.tar.gz
Add define value `nimBurnFree` which allow deallocation procedures to fill memory with 0xFF before freeing it.
Diffstat (limited to 'lib/system/mmdisp.nim')
-rw-r--r--lib/system/mmdisp.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim
index 186349152..63af49e35 100644
--- a/lib/system/mmdisp.nim
+++ b/lib/system/mmdisp.nim
@@ -21,7 +21,7 @@ const
   alwaysGC = defined(fulldebug) # collect after every memory
                                 # allocation (for debugging)
   leakDetector = false
-  overwriteFree = false
+  overwriteFree = defined(nimBurnFree) # overwrite memory with 0xFF before free
   trackAllocationSource = leakDetector
 
   cycleGC = true # (de)activate the cycle GC