summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-standard
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-11-23 21:35:34 -0500
committerMike Frysinger <vapier@gentoo.org>2009-11-23 21:35:34 -0500
commit00673f93826bf1fbde728d202c319a684bb87150 (patch)
tree2918312040781ebf7055ca83321605e7b110002d /libc/stdlib/malloc-standard
parentc5bc75430dccfaef12220311aa4853176a8a911b (diff)
nommu: use MAP_UNINITIALIZE for mallocs
Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use it to get real uninitialized memory on no-mmu systems. This avoids a lot of normally useless overhead involved in zeroing out all of the memory (sometimes multiple times). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/stdlib/malloc-standard')
-rw-r--r--libc/stdlib/malloc-standard/malloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h
index 90c9fd14d..7a2e66d16 100644
--- a/libc/stdlib/malloc-standard/malloc.h
+++ b/libc/stdlib/malloc-standard/malloc.h
@@ -356,7 +356,7 @@ __UCLIBC_MUTEX_EXTERN(__malloc_lock);
#else
#define MMAP(addr, size, prot) \
- (mmap((addr), (size), (prot), MAP_SHARED|MAP_ANONYMOUS, 0, 0))
+ (mmap((addr), (size), (prot), MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZE, 0, 0))
#endif