--- a/src/array_list.c Thu May 15 15:43:30 2025 +0200 +++ b/src/array_list.c Thu May 15 16:02:54 2025 +0200 @@ -45,7 +45,7 @@ errno = EOVERFLOW; return NULL; } - return realloc(array, n); + return cxRealloc(cxDefaultAllocator, array, n); } CxArrayReallocator cx_array_default_reallocator_impl = { @@ -572,7 +572,7 @@ // decide if we can use the local buffer if (elem_size > CX_ARRAY_SWAP_SBO_SIZE) { - tmp = malloc(elem_size); + tmp = cxMalloc(cxDefaultAllocator, elem_size); // we don't want to enforce error handling if (tmp == NULL) abort(); } else { @@ -591,7 +591,7 @@ // free dynamic memory, if it was needed if (tmp != sbo_mem) { - free(tmp); + cxFree(cxDefaultAllocator, tmp); } }