33 #ifndef FLAC__SHARE__ALLOC_H 34 #define FLAC__SHARE__ALLOC_H 51 #include "../share/compat.h" 57 # define SIZE_T_MAX FLAC__U64L(0xffffffffffffffff) 59 # define SIZE_T_MAX 0xffffffff 65 # define SIZE_MAX SIZE_T_MAX 83 return calloc(nmemb,
size);
125 if(!size1 || !size2 || !size3)
132 return malloc(size1*size3);
148 if(!size1 || (!size2 && !size3))
155 return malloc(size1*size2);
161 void *newptr = realloc(
ptr,
size);
162 if(
size > 0 && newptr == 0)
173 return realloc(
ptr, size2);
184 return realloc(
ptr, size3);
198 return realloc(
ptr, size4);
204 return realloc(
ptr, 0);
213 if(!size1 || (!size2 && !size3))
214 return realloc(
ptr, 0);
static INLINE void * safe_realloc_add_4op_(void *ptr, size_t size1, size_t size2, size_t size3, size_t size4)
Definition: alloc.h:187
static INLINE void * safe_realloc_mul_2op_(void *ptr, size_t size1, size_t size2)
Definition: alloc.h:201
const GLvoid * ptr
Definition: nx_glsym.h:242
#define INLINE
Definition: retro_inline.h:35
static INLINE void * safe_malloc_add_4op_(size_t size1, size_t size2, size_t size3, size_t size4)
Definition: alloc.h:107
Configuration options (set of defines)
static INLINE void * safe_malloc_(size_t size)
Definition: alloc.h:71
GLsizeiptr size
Definition: glext.h:6559
static INLINE void * safe_calloc_(size_t nmemb, size_t size)
Definition: alloc.h:79
static INLINE void * safe_realloc_add_3op_(void *ptr, size_t size1, size_t size2, size_t size3)
Definition: alloc.h:176
static INLINE void * safe_realloc_(void *ptr, size_t size)
Definition: alloc.h:158
static INLINE void * safe_malloc_muladd2_(size_t size1, size_t size2, size_t size3)
Definition: alloc.h:146
static INLINE void * safe_malloc_mul2add_(size_t size1, size_t size2, size_t size3)
Definition: alloc.h:136
static INLINE void * safe_malloc_add_2op_(size_t size1, size_t size2)
Definition: alloc.h:88
#define SIZE_MAX
Definition: alloc.h:65
static INLINE void * safe_realloc_add_2op_(void *ptr, size_t size1, size_t size2)
Definition: alloc.h:166
static INLINE void * safe_malloc_add_3op_(size_t size1, size_t size2, size_t size3)
Definition: alloc.h:96
static INLINE void * safe_realloc_muladd2_(void *ptr, size_t size1, size_t size2, size_t size3)
Definition: alloc.h:211
void * safe_malloc_mul_2op_(size_t size1, size_t size2)
static INLINE void * safe_malloc_mul_3op_(size_t size1, size_t size2, size_t size3)
Definition: alloc.h:123