diff -r 8c8aed7e1756 -r e5909dff0dbf ucx/allocator.c --- a/ucx/allocator.c Sun Jul 02 12:06:45 2023 +0200 +++ b/ucx/allocator.c Sun Jul 02 13:23:51 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(