diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-15 18:06:53 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-15 18:06:53 +0300 |
commit | c8d295080c37267ce5ee5762502d4ec338100a98 (patch) | |
tree | 504372f45add7890a8fd9dc6be337f16219f77fd /intern | |
parent | 578ab76bd4f96d4adad6c5f1a78ab427692aa291 (diff) |
mmap allocs now fall back on regular malloc when mmap fails.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/guardedalloc/intern/mallocn.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 6636e68b817..3e6aed7871a 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -281,7 +281,10 @@ void *MEM_mapallocN(unsigned int len, const char *str) mmap_in_use += len; return (++memh); } - print_error("Mapalloc returns nill: len=%d in %s, total %u\n",len, str, mmap_in_use); + else { + print_error("Mapalloc returns nill, fallback to regular malloc: len=%d in %s, total %u\n",len, str, mmap_in_use); + return MEM_callocN(len, str); + } return NULL; #endif } |