diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-08-30 19:29:38 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-08-30 20:08:34 +0200 |
commit | ac3ed168d0c0b2b702319ac0db72c9b475a8c72e (patch) | |
tree | 31135c056fc400d97b639238df4748085c9b1614 /malloc/arena.c | |
parent | 44bcba80f309b7517f8f954b0389e60eb421373b (diff) | |
download | glibc-ac3ed168d0c0b2b702319ac0db72c9b475a8c72e.tar.gz glibc-ac3ed168d0c0b2b702319ac0db72c9b475a8c72e.tar.xz glibc-ac3ed168d0c0b2b702319ac0db72c9b475a8c72e.zip |
malloc: Remove check_action variable [BZ #21754]
Clean up calls to malloc_printerr and trim its argument list. This also removes a few bits of work done before calling malloc_printerr (such as unlocking operations). The tunable/environment variable still enables the lightweight additional malloc checking, but mallopt (M_CHECK_ACTION) no longer has any effect.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r-- | malloc/arena.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index dc14fae152..39cbfbc282 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -215,8 +215,7 @@ void TUNABLE_CALLBACK (set_mallopt_check) (tunable_val_t *valp) { int32_t value = (int32_t) valp->numval; - do_set_mallopt_check (value); - if (check_action != 0) + if (value != 0) __malloc_check_init (); } @@ -397,12 +396,8 @@ ptmalloc_init (void) } } } - if (s && s[0]) - { - __libc_mallopt (M_CHECK_ACTION, (int) (s[0] - '0')); - if (check_action != 0) - __malloc_check_init (); - } + if (s && s[0] != '\0' && s[0] != '0') + __malloc_check_init (); #endif #if HAVE_MALLOC_INIT_HOOK |