mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-25 14:23:12 +00:00
Avoid forced purging during thread-arena migration when bg thd is on.
This commit is contained in:
@@ -494,8 +494,12 @@ arena_migrate(tsd_t *tsd, arena_t *oldarena, arena_t *newarena) {
|
|||||||
arena_nthreads_inc(newarena, false);
|
arena_nthreads_inc(newarena, false);
|
||||||
tsd_arena_set(tsd, newarena);
|
tsd_arena_set(tsd, newarena);
|
||||||
|
|
||||||
if (arena_nthreads_get(oldarena, false) == 0) {
|
if (arena_nthreads_get(oldarena, false) == 0 &&
|
||||||
/* Purge if the old arena has no associated threads anymore. */
|
!background_thread_enabled()) {
|
||||||
|
/*
|
||||||
|
* Purge if the old arena has no associated threads anymore and
|
||||||
|
* no background threads.
|
||||||
|
*/
|
||||||
arena_decay(tsd_tsdn(tsd), oldarena,
|
arena_decay(tsd_tsdn(tsd), oldarena,
|
||||||
/* is_background_thread */ false, /* all */ true);
|
/* is_background_thread */ false, /* all */ true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user