mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-15 21:27:18 +03:00
Fix background thread index issues with max_background_threads.
This commit is contained in:
parent
e8a63b87c3
commit
312352faa8
3 changed files with 10 additions and 7 deletions
|
|
@ -142,7 +142,7 @@ do_arena_reset_post(void **ptrs, unsigned nptrs, unsigned arena_ind) {
|
|||
|
||||
if (have_background_thread) {
|
||||
malloc_mutex_lock(tsdn,
|
||||
&background_thread_info[arena_ind % ncpus].mtx);
|
||||
&background_thread_info_get(arena_ind)->mtx);
|
||||
}
|
||||
/* Verify allocations no longer exist. */
|
||||
for (i = 0; i < nptrs; i++) {
|
||||
|
|
@ -151,7 +151,7 @@ do_arena_reset_post(void **ptrs, unsigned nptrs, unsigned arena_ind) {
|
|||
}
|
||||
if (have_background_thread) {
|
||||
malloc_mutex_unlock(tsdn,
|
||||
&background_thread_info[arena_ind % ncpus].mtx);
|
||||
&background_thread_info_get(arena_ind)->mtx);
|
||||
}
|
||||
|
||||
free(ptrs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue