Skip to content

Commit 837f205

Browse files
Merge pull request #393 from igchor/do_not_print_if_alloc_is_bigger_than_ac
Do not print anything if allocation size results in os allocation
2 parents 8bd1289 + 687f546 commit 837f205

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/base_alloc/base_alloc_global.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,11 @@ void *umf_ba_global_aligned_alloc(size_t size, size_t alignment) {
163163

164164
int ac_index = size_to_idx(size);
165165
if (ac_index >= NUM_ALLOCATION_CLASSES) {
166-
#ifndef NDEBUG
167-
fprintf(stderr,
168-
"base_alloc: allocation size (%zu) larger than the biggest "
169-
"allocation class. Falling back to OS memory allocation.\n",
170-
size);
171-
#endif
166+
// TODO: use logger here
167+
// fprintf(stderr,
168+
// "base_alloc: allocation size (%zu) larger than the biggest "
169+
// "allocation class. Falling back to OS memory allocation.\n",
170+
// size);
172171
return add_metadata_and_align(ba_os_alloc(size), size, alignment);
173172
}
174173

0 commit comments

Comments
 (0)