Fix background thread index issues with max_background_threads.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user