mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-13 08:26:22 +03:00
Avoid inactivity_check within background threads.
Passing is_background_thread down the decay path, so that background thread itself won't attempt inactivity_check. This fixes an issue with background thread doing trylock on a mutex it already owns.
This commit is contained in:
parent
37f3fa0941
commit
52fc887b49
2 changed files with 25 additions and 19 deletions
|
|
@ -41,8 +41,9 @@ background_thread_indefinite_sleep(background_thread_info_t *info) {
|
|||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
arena_background_thread_inactivity_check(tsdn_t *tsdn, arena_t *arena) {
|
||||
if (!background_thread_enabled()) {
|
||||
arena_background_thread_inactivity_check(tsdn_t *tsdn, arena_t *arena,
|
||||
bool is_background_thread) {
|
||||
if (!background_thread_enabled() || is_background_thread) {
|
||||
return;
|
||||
}
|
||||
background_thread_info_t *info =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue