diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-05-09 02:48:06 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-05-09 02:48:06 +0200 |
commit | 085b77730a553ce9769fcc76b68772dbde564004 (patch) | |
tree | 328ae4f715300cb5c028ad0e7ffc2e13a5c9c72a /lib/alloc/alloc_heap.c | |
parent | 20fa17a5f2a286f44bdafff6dc4bb58e7667fe46 (diff) |
Add custom allocator support to u8upper()
Diffstat (limited to 'lib/alloc/alloc_heap.c')
-rw-r--r-- | lib/alloc/alloc_heap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/alloc/alloc_heap.c b/lib/alloc/alloc_heap.c new file mode 100644 index 0000000..72cd7ad --- /dev/null +++ b/lib/alloc/alloc_heap.c @@ -0,0 +1,12 @@ +#include <stdlib.h> + +#include "alloc.h" + +void * +alloc_heap(void *, void *ptr, size_t, size_t new, size_t) +{ + if (new > 0) + return realloc(ptr, new); + free(ptr); + return nullptr; +} |