diff options
author | David Robillard <d@drobilla.net> | 2024-06-22 20:12:44 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-06-22 20:17:07 -0400 |
commit | aab5940036858663eb445c00166511ce2aea9c9d (patch) | |
tree | ed96f0b6ccbb1bddb7f6919c28fa2d4479cd4cda /include/zix/allocator.h | |
parent | 503e58d36cd467ce83a7312f55bb8beb4e5e370b (diff) | |
download | zix-aab5940036858663eb445c00166511ce2aea9c9d.tar.gz zix-aab5940036858663eb445c00166511ce2aea9c9d.tar.bz2 zix-aab5940036858663eb445c00166511ce2aea9c9d.zip |
Consistently use ZIX_MALLOC_API and ZIX_MALLOC_FUNC
Diffstat (limited to 'include/zix/allocator.h')
-rw-r--r-- | include/zix/allocator.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/zix/allocator.h b/include/zix/allocator.h index 619697e..e4d813d 100644 --- a/include/zix/allocator.h +++ b/include/zix/allocator.h @@ -108,6 +108,7 @@ ZixAllocator* ZIX_NONNULL zix_default_allocator(void); /// Convenience wrapper that defers to malloc() if allocator is null +ZIX_MALLOC_FUNC static inline void* ZIX_ALLOCATED zix_malloc(ZixAllocator* const ZIX_NULLABLE allocator, const size_t size) { @@ -117,6 +118,7 @@ zix_malloc(ZixAllocator* const ZIX_NULLABLE allocator, const size_t size) } /// Convenience wrapper that defers to calloc() if allocator is null +ZIX_MALLOC_FUNC static inline void* ZIX_ALLOCATED zix_calloc(ZixAllocator* const ZIX_NULLABLE allocator, const size_t nmemb, @@ -149,6 +151,7 @@ zix_free(ZixAllocator* const ZIX_NULLABLE allocator, } /// Convenience wrapper that defers to the system allocator if allocator is null +ZIX_MALLOC_FUNC static inline void* ZIX_ALLOCATED zix_aligned_alloc(ZixAllocator* const ZIX_NULLABLE allocator, const size_t alignment, |