summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/corealloc.c
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2014-05-16 11:33:39 +0000
committer Oliver Stöneberg <firewave@users.noreply.github.com>2014-05-16 11:33:39 +0000
commit5de2a39c869ed1d2093feb7eb0985c823448ef61 (patch)
tree3c05fac409107524bae84be00a97f104ed849c64 /src/lib/util/corealloc.c
parent109f2acb18ab75a56e8135c4cad737fdbdbd791d (diff)
re-applied safe corealloc changes (nw)
Diffstat (limited to 'src/lib/util/corealloc.c')
-rw-r--r--src/lib/util/corealloc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/util/corealloc.c b/src/lib/util/corealloc.c
index c1bc9185def..f937c5b17fc 100644
--- a/src/lib/util/corealloc.c
+++ b/src/lib/util/corealloc.c
@@ -16,7 +16,15 @@
// DEBUGGING
//**************************************************************************
-#define LOG_ALLOCS (0)
+#define LOG_ALLOCS (1)
+
+// define this to initialize allocated memory to a fixed non-0 value
+#ifdef MAME_DEBUG
+#define INITIALIZE_ALLOCATED_MEMORY
+#endif
+
+// define this to zap memory to a fixed non-0 value before freeing
+//#define OVERWRITE_FREED_MEMORY
@@ -172,9 +180,8 @@ void free_file_line(void *memory, const char *file, int line, bool array)
//-------------------------------------------------
-// dump_unfreed_mem - called from the exit path
-// of any code that wants to check for unfreed
-// memory
+// track_memory - enables or disables the memory
+// tracking
//-------------------------------------------------
void track_memory(bool track)