diff options
-rw-r--r-- | malloc/arena.c | 5 | ||||
-rw-r--r-- | malloc/malloc.c | 4 |
2 files changed, 1 insertions, 8 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index defd25c..074ecbc 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -559,16 +559,13 @@ new_heap (size_t size, size_t top_pad) #if HAVE_TUNABLES if (__glibc_unlikely (mp_.hp_pagesize != 0)) { - /* MAP_NORESERVE is not used for huge pages because some kernel may - not reserve the mmap region and a subsequent access may trigger - a SIGBUS if there is no free pages in the pool. */ heap_info *h = alloc_new_heap (size, top_pad, mp_.hp_pagesize, mp_.hp_flags); if (h != NULL) return h; } #endif - return alloc_new_heap (size, top_pad, GLRO (dl_pagesize), MAP_NORESERVE); + return alloc_new_heap (size, top_pad, GLRO (dl_pagesize), 0); } /* Grow a heap. size is automatically rounded up to a diff --git a/malloc/malloc.c b/malloc/malloc.c index 914052e..29fa71b 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1110,10 +1110,6 @@ static mchunkptr mremap_chunk(mchunkptr p, size_t new_size); # define MAP_ANONYMOUS MAP_ANON #endif -#ifndef MAP_NORESERVE -# define MAP_NORESERVE 0 -#endif - #define MMAP(addr, size, prot, flags) \ __mmap((addr), (size), (prot), (flags)|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0) |