From 4762e3a38ffc56df3f6e224d4ea79419b4dd0b67 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Thu, 15 May 2014 19:06:32 +0000 Subject: Revert of r30457 per Micko (nw) --- src/lib/util/corealloc.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/lib/util/corealloc.h') diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h index 21bf093c3f4..d3982ea3d86 100644 --- a/src/lib/util/corealloc.h +++ b/src/lib/util/corealloc.h @@ -18,6 +18,18 @@ #include "osdcore.h" +//************************************************************************** +// DEBUGGING +//************************************************************************** + +// define this to initialize allocated memory to a fixed non-0 value +//#define INITIALIZE_ALLOCATED_MEMORY + +// define this to zap memory to a fixed non-0 value before freeing +//#define OVERWRITE_FREED_MEMORY + + + //************************************************************************** // MACROS //************************************************************************** @@ -27,8 +39,8 @@ #define global_alloc_clear(_type) new(__FILE__, __LINE__, zeromem) _type #define global_alloc_array(_type, _num) new(__FILE__, __LINE__) _type[_num] #define global_alloc_array_clear(_type, _num) new(__FILE__, __LINE__, zeromem) _type[_num] -#define global_free(_ptr) do { operator delete(_ptr, __FILE__, __LINE__); } while (0) -#define global_free_array(_ptr) do { operator delete[](_ptr, __FILE__, __LINE__); } while (0) +#define global_free(_ptr) do { delete _ptr; } while (0) +#define global_free_array(_ptr) do { delete[] _ptr; } while (0) -- cgit v1.2.3-70-g09d2