diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-02 22:49:51 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-02 22:49:51 +0300 |
commit | 61824579b0d72bf2b46f31aa1434f78e54e1f456 (patch) | |
tree | 895c6b1f98ccc9a09ada75d6f18b209bd498c03e /intern/guardedalloc | |
parent | 3d2aa2815da572ddaa014144b72c60223d7346ba (diff) |
Improved error print in case malloc returns NULL; it now adds the current
total allocated.
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r-- | intern/guardedalloc/intern/mallocn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 44f7eda5310..63b49c5ad4f 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -229,7 +229,7 @@ void *MEM_mallocN(unsigned int len, const char *str) make_memhead_header(memh, len, str); return (++memh); } - print_error("Malloc returns nill: len=%d in %s\n",len,str); + print_error("Malloc returns nill: len=%d in %s, total %d\n",len, str, mem_in_use); return NULL; } @@ -245,7 +245,7 @@ void *MEM_callocN(unsigned int len, const char *str) make_memhead_header(memh, len, str); return (++memh); } - print_error("Calloc returns nill: len=%d in %s\n",len,str); + print_error("Calloc returns nill: len=%d in %s, total %d\n",len, str, mem_in_use); return 0; } @@ -268,7 +268,7 @@ void *MEM_mapallocN(unsigned int len, const char *str) mmap_in_use += len; return (++memh); } - print_error("Mapalloc returns nill: len=%d in %s\n",len, str); + print_error("Mapalloc returns nill: len=%d in %s, total %d\n",len, str, mmap_in_use); return NULL; #endif } |