76 <<
"Aleph::allocate() expects size > 0";
78 void * ptr = std::malloc(
size);
94 <<
"Aleph::allocate_zeroed() expects size > 0";
96 void * ptr = std::calloc(1u,
size);
Exception handling system with formatted messages for Aleph-w.
#define ah_invalid_argument_if(C)
Throws std::invalid_argument if condition holds.
#define ah_bad_alloc_if(C)
Throws std::bad_alloc if condition holds.
Main namespace for Aleph-w library functions.
size_t size(Node *root) noexcept
T * allocate(AhArenaAllocator &arena, Args &&... args)
Allocate and construct an object in an arena.
void * allocate_zeroed(const std::size_t size)
Allocate size zero-initialized bytes.
void deallocate(AhArenaAllocator &arena, T *ptr) noexcept
Destruct and deallocate an object from an arena.