mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
Don't call reused_arena when _int_new_arena failed
This commit is contained in:
parent
7edb22eff5
commit
a5fb313cb7
@ -1,3 +1,8 @@
|
||||
2011-11-14 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* malloc/arena.c (arena_get2): Don't call reused_arena when
|
||||
_int_new_arena failed.
|
||||
|
||||
2011-11-12 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/clock_gettime.c (clock_gettime): No need to assign
|
||||
|
@ -844,14 +844,14 @@ arena_get2(mstate a_tsd, size_t size)
|
||||
size_t n = narenas;
|
||||
if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
|
||||
{
|
||||
if (catomic_compare_and_exchange_bool_acq(&narenas, n + 1, n))
|
||||
if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
|
||||
goto repeat;
|
||||
a = _int_new_arena (size);
|
||||
if (__builtin_expect (a != NULL, 1))
|
||||
return a;
|
||||
catomic_decrement(&narenas);
|
||||
if (__builtin_expect (a == NULL, 0))
|
||||
catomic_decrement (&narenas);
|
||||
}
|
||||
a = reused_arena ();
|
||||
else
|
||||
a = reused_arena ();
|
||||
}
|
||||
#else
|
||||
if(!a_tsd)
|
||||
|
Loading…
Reference in New Issue
Block a user