diff options
author | 2014-05-15 12:09:20 +0000 | |
---|---|---|
committer | 2014-05-15 12:09:20 +0000 | |
commit | 36ad612f608726a3981bdc3d8f85db27a3304e26 (patch) | |
tree | 29ae7358a58c01405721747f8a953622629608fe /src/lib/util/corealloc.h | |
parent | 175dedacfc1aecfaf2b8c79232ea991f29372d62 (diff) |
corealloc adjustments:
- re-enabled default memory initialization in DEBUG builds (should make random crashes less random)
- moved defines from header to source since they are only used locally and not globally
- added file/line information to global_free* and fixed src/emu/sound/spu.c compilation
Diffstat (limited to 'src/lib/util/corealloc.h')
-rw-r--r-- | src/lib/util/corealloc.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h index d3982ea3d86..21bf093c3f4 100644 --- a/src/lib/util/corealloc.h +++ b/src/lib/util/corealloc.h @@ -19,18 +19,6 @@ //************************************************************************** -// 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 //************************************************************************** @@ -39,8 +27,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 { delete _ptr; } while (0) -#define global_free_array(_ptr) do { delete[] _ptr; } while (0) +#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) |