Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-03-15 18:06:53 +0300
committerTon Roosendaal <ton@blender.org>2006-03-15 18:06:53 +0300
commitc8d295080c37267ce5ee5762502d4ec338100a98 (patch)
tree504372f45add7890a8fd9dc6be337f16219f77fd /intern
parent578ab76bd4f96d4adad6c5f1a78ab427692aa291 (diff)
mmap allocs now fall back on regular malloc when mmap fails.
Diffstat (limited to 'intern')
-rw-r--r--intern/guardedalloc/intern/mallocn.c5
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
}