8 #if defined(__ibmxl__) || defined(__xlc__)
13 int ret = posix_memalign(&ptr, alignment, size);
14 if (ABTI_IS_ERROR_CHECK_ENABLED && ret != 0) {
26 #ifdef ABT_CONFIG_USE_ALIGNED_ALLOC
42 if (ABTI_IS_ERROR_CHECK_ENABLED && ret !=
ABT_SUCCESS) {
45 memset(ptr, 0, num * size);
52 void *new_ptr, *old_ptr = *p_ptr;
54 if (ABTI_IS_ERROR_CHECK_ENABLED && ret !=
ABT_SUCCESS) {
57 memcpy(new_ptr, old_ptr, (old_size < new_size) ? old_size : new_size);
67 void *ptr = malloc(size);
68 if (ABTI_IS_ERROR_CHECK_ENABLED && ptr == NULL) {
77 void *ptr = calloc(num, size);
78 if (ABTI_IS_ERROR_CHECK_ENABLED && ptr == NULL) {
88 void *ptr = realloc(*p_ptr, new_size);
89 if (ABTI_IS_ERROR_CHECK_ENABLED && ptr == NULL) {
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
static ABTU_ret_err int ABTU_realloc(size_t old_size, size_t new_size, void **p_ptr)
static ABTU_ret_err int ABTU_memalign(size_t alignment, size_t size, void **p_ptr)
static ABTU_ret_err int ABTU_calloc(size_t num, size_t size, void **p_ptr)
static void ABTU_free(void *ptr)