diff options
Diffstat (limited to 'intern/guardedalloc/intern/mallocn.c')
-rw-r--r-- | intern/guardedalloc/intern/mallocn.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 09f2d33a674..b213a1c3744 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -856,4 +856,18 @@ int MEM_get_memory_blocks_in_use(void) return _totblock; } +#ifndef NDEBUG +const char *MEM_name_ptr(void *vmemh) +{ + if (vmemh) { + MemHead *memh= vmemh; + memh--; + return memh->name; + } + else { + return "MEM_name_ptr(NULL)"; + } +} +#endif + /* eof */ |