Skip to content

Commit 7e9f4d8

Browse files
committed
fix for ThreadSanitizer
1 parent 15881fc commit 7e9f4d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pool/pool_disjoint.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,9 @@ bool bucket_can_pool(bucket_t *bucket, bool *to_pool) {
521521
}
522522

523523
if (bucket_capacity(bucket) >= NewFreeSlabsInBucket) {
524-
size_t pool_size = bucket->shared_limits->total_size;
524+
size_t pool_size = 0;
525+
utils_atomic_load_acquire(&bucket->shared_limits->total_size,
526+
&pool_size);
525527
while (true) {
526528
size_t new_pool_size = pool_size + bucket_slab_alloc_size(bucket);
527529

0 commit comments

Comments
 (0)