From 00673f93826bf1fbde728d202c319a684bb87150 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 23 Nov 2009 21:35:34 -0500 Subject: 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 --- libc/sysdeps/linux/hppa/bits/mman.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc/sysdeps/linux/hppa/bits') diff --git a/libc/sysdeps/linux/hppa/bits/mman.h b/libc/sysdeps/linux/hppa/bits/mman.h index 54531ecf2..7f9bf4ed6 100644 --- a/libc/sysdeps/linux/hppa/bits/mman.h +++ b/libc/sysdeps/linux/hppa/bits/mman.h @@ -45,6 +45,8 @@ #define MAP_GROWSDOWN 0x8000 /* stack-like segment */ #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. */ #define MS_SYNC 1 /* synchronous memory sync */ #define MS_ASYNC 2 /* sync memory asynchronously */ -- cgit v1.2.3