120 #define MCL_MALLOC(bytes) memory_allocate(bytes, __FUNCTION__, __LINE__) 121 #define MCL_NEW(p) ((p) = MCL_MALLOC((long)sizeof (*p))) 122 #define MCL_CALLOC(count, bytes) memory_allocate_with_zero(count, bytes, __FUNCTION__, __LINE__) 123 #define MCL_NEW_WITH_ZERO(p) ((p) = MCL_CALLOC(1, (long)sizeof *(p))) 124 #define MCL_RESIZE(p, bytes) ((p) = memory_reallocate(p, bytes, __FUNCTION__, __LINE__)) 125 #define MCL_FREE(p) ((void)(memory_release((p), __FUNCTION__, (mcl_uint32_t)__LINE__), (p) = MCL_NULL)) 127 #endif //MCL_MEMORY_H_ void * memory_malloc(mcl_size_t size)
malloc wrapper
Common module interface header file.
void * memory_allocate(mcl_size_t bytes, const char *function, unsigned line)
void * memory_reallocate(void *p, mcl_size_t bytes, const char *function, unsigned line)
void memory_release(void *p, const char *function, unsigned line)
void * memory_allocate_with_zero(mcl_size_t count, mcl_size_t bytes, const char *function, unsigned line)
void memory_free(void *p)
free wrapper
void * memory_calloc(mcl_size_t count, mcl_size_t bytes)
calloc wrapper
void * memory_realloc(void *p, mcl_size_t bytes)
realloc wrapper