Provide an implementation of the heap that allocates blocks from an area of memory allocated by a single call to malloc. You must utilize the "first-fit" allocation strategy described in the Program 4 spec.
Also provide the dumpHeap function to display the current state of the heap.
If you exhaust the free space in the heap, or the available elements in the indirection array, then you can simply halt the VM with the appropriate message.
Tests GCtest1, GCtest2 and GCtest3 can be used to test your allocator. You can also use heapTest from before, and run maTe programs using mvm, but you will need to give them big enough heaps that they can be run without a garbage collector.
To turn in this laboratory, type:
% ~cs520/bin/submit lab7 heap.c
Submissions can be checked by typing:
% ~cs520/bin/scheck lab7
Remember that there are no late submissions of labs. Submit what you have prior to noon on Sunday October 23.
Comments and questions should be directed to pjh@cs.unh.edu