Skip to content

Commit 531e686

Browse files
committed
Print size of the exceeding allocation in the debug message
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent 87a2d94 commit 531e686

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/base_alloc/base_alloc_global.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,9 @@ void *umf_ba_global_aligned_alloc(size_t size, size_t alignment) {
161161
if (ac_index >= NUM_ALLOCATION_CLASSES) {
162162
#ifndef NDEBUG
163163
fprintf(stderr,
164-
"base_alloc: allocation size larger than the biggest "
165-
"allocation class. Falling back to OS memory allocation.\n");
164+
"base_alloc: allocation size (%zu) larger than the biggest "
165+
"allocation class. Falling back to OS memory allocation.\n",
166+
size);
166167
#endif
167168
return add_metadata_and_align(ba_os_alloc(size), size, alignment);
168169
}

0 commit comments

Comments
 (0)