18 #if (1 == HAVE_STDLIB_H_) 24 VERBOSE_ENTRY(
"mcl_size_t bytes = <%u>, const char *function = <%s>, unsigned line = <%u>", bytes,
function, line)
34 MCL_VERBOSE(
"%d bytes allocated in memory successfully. Address = <%p>", bytes, p);
41 VERBOSE_ENTRY(
"mcl_size_t count = <%u>, mcl_size_t bytes = <%u>, const char *function = <%s>, unsigned line = <%u>", count, bytes,
function, line)
52 MCL_VERBOSE(
"%d bytes allocated in memory successfully. Address = <%p>", count * bytes, p);
59 VERBOSE_ENTRY(
"void *p = <%p>, mcl_size_t bytes = <%u>, const char *function = <%s>, unsigned line = <%u>", p, bytes,
function, line)
72 MCL_VERBOSE(
"Memory couldn't be re-allocated! Freeing the original one.");
78 MCL_VERBOSE(
"%d bytes re-allocated in memory successfully. Address = <%p>", bytes, p);
85 VERBOSE_ENTRY(
"void *p = <%p>, const char *function = <%s>, unsigned line = <%u>", p,
function, line)
103 void *p = malloc(size);
111 VERBOSE_ENTRY(
"mcl_size_t count = <%u>, mcl_size_t bytes = <%u>", count, bytes)
113 void *p = calloc(count, bytes);
121 VERBOSE_ENTRY(
"void *p = <%p>, mcl_size_t bytes = <%u>", p, bytes)
123 p = realloc(p, bytes);
133 MCL_VERBOSE(
"Memory will be freed at location = <%p>.", p);
Memory module header file.
#define VERBOSE_LEAVE(...)
void * memory_allocate_with_zero(mcl_size_t count, mcl_size_t bytes, const char *function, unsigned line)
#define ASSERT_MESSAGE(condition,...)
Log utility module header file.
void * memory_allocate(mcl_size_t bytes, const char *function, unsigned line)
void * memory_malloc(mcl_size_t size)
malloc wrapper
#define VERBOSE_ENTRY(...)
Definitions module header file.
void memory_free(void *p)
free wrapper
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_calloc(mcl_size_t count, mcl_size_t bytes)
calloc wrapper
void * memory_realloc(void *p, mcl_size_t bytes)
realloc wrapper