diff -r aeaf7db26fac -r c094afcdfb27 src/ucx/allocator.c --- a/src/ucx/allocator.c Sun Jul 09 15:14:26 2023 +0200 +++ b/src/ucx/allocator.c Mon Jul 10 18:39:24 2023 +0200 @@ -75,6 +75,20 @@ }; CxAllocator *cxDefaultAllocator = &cx_default_allocator; + +int cx_reallocate( + void **mem, + size_t n +) { + void *nmem = realloc(*mem, n); + if (nmem == NULL) { + return 1; + } else { + *mem = nmem; + return 0; + } +} + // IMPLEMENTATION OF HIGH LEVEL API void *cxMalloc(