Skip to content

Commit cb7a810

Browse files
committed
Add utils_annotate_memory_inaccessible
1 parent 4d21278 commit cb7a810

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/base_alloc/base_alloc_global.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,12 @@ void umf_ba_global_free(void *ptr) {
195195

196196
int ac_index = size_to_idx(total_size);
197197
if (ac_index >= NUM_ALLOCATION_CLASSES) {
198-
utils_annotate_memory_inaccessible(ptr, total_size);
199198
ba_os_free(ptr, total_size);
200199
return;
201200
}
202201

203202
if (!BASE_ALLOC.ac[ac_index]) {
204203
// if creating ac failed, memory must have been allocated by os
205-
utils_annotate_memory_inaccessible(ptr, total_size);
206204
ba_os_free(ptr, total_size);
207205
return;
208206
}

src/base_alloc/base_alloc_linux.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ void *ba_os_alloc(size_t size) {
2929
}
3030

3131
void ba_os_free(void *ptr, size_t size) {
32+
utils_annotate_memory_inaccessible(ptr, size);
3233
int ret = munmap(ptr, size);
3334
assert(ret == 0);
3435
(void)ret; // unused

0 commit comments

Comments
 (0)