X-Git-Url: https://develop.uap-core.de/gitweb/uwplayer.git/blobdiff_plain/848befbcc166fff6fdde6a635cf7a31f9f9185e0..01d5015ba093f8c5fdb18b669943c7da6450e72f:/ucx/allocator.c diff --git a/ucx/allocator.c b/ucx/allocator.c index 7ccc6ff..e12255e 100644 --- a/ucx/allocator.c +++ b/ucx/allocator.c @@ -75,6 +75,20 @@ struct cx_allocator_s cx_default_allocator = { }; 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(