]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't change no_dyn_threshold on mallopt failure
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 5 Sep 2012 18:43:04 +0000 (15:43 -0300)
committerAlexandre Oliva <lxoliva@fsfla.org>
Wed, 5 Sep 2012 18:43:04 +0000 (15:43 -0300)
* malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not
change internal state upon failure.

ChangeLog
malloc/malloc.c

index db63a81d0e74c1550e35f1b87f894e62c5fde852..6529e08f0f97a0515ec8bc29b970184f01a55e80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-05  Alexandre Oliva  <aoliva@redhat.com>
+
+       * malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not
+       change internal state upon failure.
+
 2012-09-05  Alexandre Oliva  <aoliva@redhat.com>
 
        * malloc/mcheck.c (mcheck_check_all): Fix typo.
index bd562df9591b59f6d49c32d04745c6d95ca45288..c69e2813897bb6eebbfaf1e294d43ed571147a1e 100644 (file)
@@ -4769,8 +4769,10 @@ int __libc_mallopt(int param_number, int value)
     if((unsigned long)value > HEAP_MAX_SIZE/2)
       res = 0;
     else
-      mp_.mmap_threshold = value;
-      mp_.no_dyn_threshold = 1;
+      {
+       mp_.mmap_threshold = value;
+       mp_.no_dyn_threshold = 1;
+      }
     break;
 
   case M_MMAP_MAX: