mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 09:07:18 +03:00
Fix arena_get() for (!init_if_missing && refresh_if_missing) case.
Fix arena_get() to refresh the cache as needed in the (!init_if_missing
&& refresh_if_missing) case.
This flaw was introduced by the initial arena_get() implementation,
which was part of 8bb3198f72 (Refactor/fix
arenas manipulation.).
This commit is contained in:
parent
8d0e04d42f
commit
23694b0745
1 changed files with 1 additions and 4 deletions
|
|
@ -755,10 +755,7 @@ arena_get(tsd_t *tsd, unsigned ind, bool init_if_missing,
|
|||
arena = arenas_cache[ind];
|
||||
if (likely(arena != NULL) || !refresh_if_missing)
|
||||
return (arena);
|
||||
if (init_if_missing)
|
||||
return (arena_get_hard(tsd, ind, init_if_missing));
|
||||
else
|
||||
return (NULL);
|
||||
return (arena_get_hard(tsd, ind, init_if_missing));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue