diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2012-09-05 15:43:04 -0300 |
---|---|---|
committer | Alexandre Oliva <lxoliva@fsfla.org> | 2012-09-05 15:43:04 -0300 |
commit | 5c44738353ecaa1c81efca063ee8b55e092d7a43 (patch) | |
tree | a5a4cb9a9a10cba1020dfbb8be3161faf6e733f1 | |
parent | fad64255f4b49e3acb506b2a09972c2ff1255f8a (diff) | |
download | glibc-5c44738353ecaa1c81efca063ee8b55e092d7a43.tar.gz glibc-5c44738353ecaa1c81efca063ee8b55e092d7a43.tar.xz glibc-5c44738353ecaa1c81efca063ee8b55e092d7a43.zip |
Don't change no_dyn_threshold on mallopt failure
* malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not change internal state upon failure.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | malloc/malloc.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index db63a81d0e..6529e08f0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 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. * malloc/memusage.c (mmap): Likewise. (mmap64, mremap): Likewise. Adjust name in comment. diff --git a/malloc/malloc.c b/malloc/malloc.c index bd562df959..c69e281389 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -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: |