summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--malloc/malloc.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index b67f2c84ee..697cfc6618 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5330,16 +5330,11 @@ do_set_top_pad (size_t value)
 static __always_inline int
 do_set_mmap_threshold (size_t value)
 {
-  /* Forbid setting the threshold too high.  */
-  if (value <= heap_max_size () / 2)
-    {
-      LIBC_PROBE (memory_mallopt_mmap_threshold, 3, value, mp_.mmap_threshold,
-		  mp_.no_dyn_threshold);
-      mp_.mmap_threshold = value;
-      mp_.no_dyn_threshold = 1;
-      return 1;
-    }
-  return 0;
+  LIBC_PROBE (memory_mallopt_mmap_threshold, 3, value, mp_.mmap_threshold,
+	      mp_.no_dyn_threshold);
+  mp_.mmap_threshold = value;
+  mp_.no_dyn_threshold = 1;
+  return 1;
 }
 
 static __always_inline int