From f0ea9447ce10b6b5262cedeeabe36ab39aed14f1 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Tue, 20 Sep 2016 17:34:36 +0300 Subject: [PATCH] Add define value `nimBurnFree` which allow deallocation procedures to fill memory with 0xFF before freeing it. --- lib/system/mmdisp.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim index 1863491525..63af49e35b 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