8 #define get_mem(nmemb, size) tag_alloc(nmemb, size, __FILE__, __LINE__)
9 #define free_mem(mem_addr) untag_alloc(mem_addr, __FILE__, __LINE__)
10 #define FREE_MEM untag_alloc
33 void *
tag_alloc(
size_t nmemb,
size_t size,
char *file,
int line);
34 void untag_alloc(
void *mem_addr,
char *file,
int line);
struct memory_record t_mem_record
void mem_init(void)
Initailize memory module
struct mem_mamnager t_mem_manager
void * tag_alloc(size_t nmemb, size_t size, char *file, int line)
allocate memory and store in mem list (tagging)
void mem_alloc_report(void)
print report of all the assigned memory
void mem_finit(void)
Close memory module by checking and destroying if any tagged memory
void untag_alloc(void *mem_addr, char *file, int line)
deallocate memory and remove from mem list (untagging)
t_mem_record * mem_record
struct memory_record * next