Skip to content

Commit 554a2c7

Browse files
committed
Extend TSAN annotations in scalable pool
1 parent 8df47bd commit 554a2c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/pool/pool_scalable.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ static void *tbb_malloc(void *pool, size_t size) {
181181
}
182182
return NULL;
183183
}
184+
185+
utils_annotate_acquire(ptr);
186+
184187
return ptr;
185188
}
186189

@@ -214,6 +217,10 @@ static void *tbb_realloc(void *pool, void *ptr, size_t size) {
214217
}
215218
return NULL;
216219
}
220+
221+
utils_annotate_release(ptr);
222+
utils_annotate_acquire(new_ptr);
223+
217224
return new_ptr;
218225
}
219226

@@ -228,6 +235,9 @@ static void *tbb_aligned_malloc(void *pool, size_t size, size_t alignment) {
228235
}
229236
return NULL;
230237
}
238+
239+
utils_annotate_acquire(ptr);
240+
231241
return ptr;
232242
}
233243

0 commit comments

Comments
 (0)