Skip to content

Commit 038cfe8

Browse files
committed
Add annotations to umf_ba_alloc() and umf_ba_free()
Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 4c70f6c commit 038cfe8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/base_alloc/base_alloc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 Intel Corporation
2+
* Copyright (C) 2024-2025 Intel Corporation
33
*
44
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
55
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -244,6 +244,8 @@ void *umf_ba_alloc(umf_ba_pool_t *pool) {
244244

245245
utils_mutex_unlock(&pool->metadata.free_lock);
246246

247+
utils_annotate_acquire(chunk);
248+
247249
return chunk;
248250
}
249251

@@ -277,6 +279,8 @@ void umf_ba_free(umf_ba_pool_t *pool, void *ptr) {
277279

278280
umf_ba_chunk_t *chunk = (umf_ba_chunk_t *)ptr;
279281

282+
utils_annotate_release(chunk);
283+
280284
utils_mutex_lock(&pool->metadata.free_lock);
281285
assert(pool_contains_pointer(pool, ptr));
282286
chunk->next = pool->metadata.free_list;

0 commit comments

Comments
 (0)