diff options
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 0e65d636cd..fe973770a6 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -5115,6 +5115,19 @@ do_set_tcache_unsorted_limit (size_t value) } #endif +static inline int +__always_inline +do_set_mxfast (size_t value) +{ + if (value >= 0 && value <= MAX_FAST_SIZE) + { + LIBC_PROBE (memory_mallopt_mxfast, 2, value, get_max_fast ()); + set_max_fast (value); + return 1; + } + return 0; +} + int __libc_mallopt (int param_number, int value) { @@ -5134,13 +5147,7 @@ __libc_mallopt (int param_number, int value) switch (param_number) { case M_MXFAST: - if (value >= 0 && value <= MAX_FAST_SIZE) - { - LIBC_PROBE (memory_mallopt_mxfast, 2, value, get_max_fast ()); - set_max_fast (value); - } - else - res = 0; + do_set_mxfast (value); break; case M_TRIM_THRESHOLD: |