summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/corealloc.h
diff options
context:
space:
mode:
author David Haywood <mamehaze@users.noreply.github.com>2016-01-04 04:06:13 +0000
committer David Haywood <mamehaze@users.noreply.github.com>2016-01-04 04:06:13 +0000
commitcc00b13b9259fc957d7f1698db49f283037298af (patch)
tree8ead5074561428ad20c5cd0fdaa92c804f34310e /src/lib/util/corealloc.h
parent823a779de2763f6834eb3f5db727348ddf09ac85 (diff)
parenta3f2c5abcd892fec0aeffbb0d661490bcf295108 (diff)
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src/lib/util/corealloc.h')
-rw-r--r--src/lib/util/corealloc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h
index 5cd481824ed..c4d6793562d 100644
--- a/src/lib/util/corealloc.h
+++ b/src/lib/util/corealloc.h
@@ -43,6 +43,10 @@ void *malloc_file_line(size_t size, const char *file, int line, bool array, bool
void free_file_line(void *memory, const char *file, int line, bool array);
inline void free_file_line(const void *memory, const char *file, int line, bool array) { free_file_line(const_cast<void *>(memory), file, line, array); }
+// realloc with file and line number info for internal use
+void *realloc_internal(void *memory, size_t size, const char *file, int line, bool array);
+
+
// called from the exit path of any code that wants to check for unfreed memory
void track_memory(bool track);
UINT64 next_memory_id();
@@ -91,7 +95,7 @@ extern const zeromem_t zeromem;
#undef free
#define malloc(x) malloc_file_line(x, __FILE__, __LINE__, true, false, false)
-#define realloc(x,y) __error_realloc_is_dangerous__
+#define realloc(x,y) realloc_internal(x, y, __FILE__, __LINE__, true, false)
#define free(x) free_file_line(x, __FILE__, __LINE__, true)
#if !defined(_MSC_VER) || _MSC_VER < 1900 // < VS2015