diff options
Diffstat (limited to 'include/alloc.h')
-rw-r--r-- | include/alloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/alloc.h b/include/alloc.h index 57e7f59..966361e 100644 --- a/include/alloc.h +++ b/include/alloc.h @@ -20,9 +20,9 @@ typedef struct { size_t _init; } arena; +/* Heap allocation functions */ [[nodiscard, gnu::returns_nonnull]] void *bufalloc(void *, size_t, size_t); [[nodiscard]] void *bufalloc_noterm(void *, size_t, size_t); -[[nodiscard]] void *heapalloc(void *, void *, size_t, size_t); [[_mlib_pure, _mlib_inline]] static inline arena @@ -44,4 +44,7 @@ void arena_free(arena *); #define arena_resz(a, T, p, n) \ ((T *)arena_realloc((a), (p), (n), sizeof(T), alignof(T))) +[[nodiscard]] void *alloc_arena(void *, void *, size_t, size_t, size_t); +[[nodiscard]] void *alloc_heap(void *, void *, size_t, size_t, size_t); + #endif /* !MLIB_ALLOC_H */ |