Malloc Lab

Malloc Lab

Tags
C
Computer Systems
Created Date
Mar 31, 2020
A dynamic memory allocator with 74% utilization.
 
I used a segregated list implementation of malloc with 14-size classes. The minimum block size is 16 bytes and the footers are removed from allocated blocks and minimum-size blocks.
 
Implemented the following functions.
bool mm_init(void); void *malloc(size_t size); void free(void *ptr); void *realloc(void *ptr, size_t size); void *calloc(size_t nmemb, size_t size); bool mm_checkheap(int);