summaryrefslogtreecommitdiffstats
path: root/include/zix/allocator.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-06-22 20:12:44 -0400
committerDavid Robillard <d@drobilla.net>2024-06-22 20:17:07 -0400
commitaab5940036858663eb445c00166511ce2aea9c9d (patch)
treeed96f0b6ccbb1bddb7f6919c28fa2d4479cd4cda /include/zix/allocator.h
parent503e58d36cd467ce83a7312f55bb8beb4e5e370b (diff)
downloadzix-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.h3
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,