Define COAL_MAKE_ALLOCA_TYPED_PTR
Defined in File alloca.h
Define Documentation
-
COAL_MAKE_ALLOCA_TYPED_PTR(Type, Name, Size)
Macro to create a pointer of type Type, with Size * sizeof(Type) allocated elements, refered to by variable Name.
If
Size * sizeof(Type) <= COAL_ALLOCA_MAX_STACK_BYTES, the buffer is allocated on the stack viaalloca(zero overhead, freed on function return). Otherwise a heap buffer is allocated and owned by astd::unique_ptrthat is freed when it goes out of scope.