summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa/bits/mman.h
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/sysdeps/linux/xtensa/bits/mman.h
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/sysdeps/linux/xtensa/bits/mman.h')
-rw-r--r--libc/sysdeps/linux/xtensa/bits/mman.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/xtensa/bits/mman.h b/libc/sysdeps/linux/xtensa/bits/mman.h
index d3beae6aa..fead3ac20 100644
--- a/libc/sysdeps/linux/xtensa/bits/mman.h
+++ b/libc/sysdeps/linux/xtensa/bits/mman.h
@@ -64,6 +64,8 @@
# define MAP_NORESERVE 0x0400 /* Don't check for reservations. */
# define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables. */
# define MAP_NONBLOCK 0x20000 /* Do not block on IO. */
+# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
+ be uninitialized. */
#endif
/* Flags to `msync'. */