mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Purge all if the last thread migrated away from an arena.
This commit is contained in:
parent
c91e62dd37
commit
61978bbe69
1 changed files with 6 additions and 0 deletions
|
|
@ -472,6 +472,12 @@ arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind) {
|
|||
arena_nthreads_dec(oldarena, false);
|
||||
arena_nthreads_inc(newarena, false);
|
||||
tsd_arena_set(tsd, newarena);
|
||||
|
||||
if (arena_nthreads_get(oldarena, false) == 0) {
|
||||
/* Purge if the old arena has no associated threads anymore. */
|
||||
arena_decay(tsd_tsdn(tsd), oldarena,
|
||||
/* is_background_thread */ false, /* all */ true);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue