/* Author: Hyrum D. Carroll Date: October 8, 2018 Description: Function prototypes to override libc's malloc() and free() (and helper functions) */ #ifndef PROJECT2_H #define PROJECT2_H #include // size_t // Initialize the heap to the totalHeapSize bytes (includes any header overhead) int heapInit( size_t totalHeapSize ); // Finds an available chunk of memory that can support a payload of at least // size bytes and reserves that memory. Otherwise, returns NULL. void* malloc( size_t size ); // Releases (un-reserves) the memory chunk who's payload starts at ptr. void free( void* ptr ); // A helper function to display the details (memory address, size and next // pointer) of each free chunk void printFreeList( ); #endif