15 #ifndef _GLIBCXX_CSTDLIB
18 #ifndef _GLIBCXX_CSTRING
31 int error = posix_memalign(tgt, alignment, len);
45 tgt = (
TYPE*)realloc(tgt, nelem*
sizeof(
TYPE));
52 if (nelem>oelem) memset(tgt+oelem, 0, (nelem-oelem)*
sizeof(
TYPE));
77 tgt = ARB_alloc<TYPE>(nelem);
102 tgt = ARB_calloc<TYPE>(nelem);
106 #error arb_mem.h included twice
TYPE * ARB_alloc(size_t nelem)
static void error(const char *msg)
void ARB_recalloc(TYPE *&tgt, size_t oelem, size_t nelem)
void failed_to_allocate(const char *reason) __ATTR__NORETURN
TYPE * ARB_calloc(size_t nelem)
void ARB_realloc(TYPE *&tgt, size_t nelem)
void alloc_aligned(void **tgt, size_t alignment, size_t len)
void ARB_alloc_aligned(TYPE *&tgt, size_t nelems)