diff -r f1e4c6dabfb4 -r 38ee262e8b94 src/cx/allocator.h --- a/src/cx/allocator.h Sun Sep 26 17:58:27 2021 +0200 +++ b/src/cx/allocator.h Sun Sep 26 18:01:51 2021 +0200 @@ -118,6 +118,7 @@ * @param n the number of bytes * @return a pointer to the allocated memory */ +__attribute__ ((malloc)) void *cxMalloc(CxAllocator allocator, size_t n); /** @@ -149,6 +150,7 @@ * @param n the new size in bytes * @return zero on success, non-zero on failure */ +__attribute__ ((nonnull)) int cxReallocate(CxAllocator allocator, void **mem, size_t n); /** @@ -159,6 +161,7 @@ * @param n the size of each element in bytes * @return a pointer to the allocated memory */ +__attribute__ ((malloc)) void *cxCalloc(CxAllocator allocator, size_t nelem, size_t n); /** @@ -169,6 +172,7 @@ * @param allocator the allocator * @param mem a pointer to the block to free */ +__attribute__((nonnull)) void cxFree(CxAllocator allocator, void *mem); #ifdef __cplusplus