Assignment 11, due Dec 1
Part of
the homework for 22C:50, Fall 2003
|
Write a boundary tag heap manager that manages a heap of 10,000 words. The heap itself should be allocated in a global array called heap. Here is a reasonable way to declare heap:
void * heap[10,000];
The interface to your heap manager should use myalloc() for allocation and myfree() for deallocation, but aside from the prefix my, these should have the same interface specification as malloc() and free() in the standard C library. Your heap manager should return a null pointer if it cannot satisfy an allocation request.
A test program for your heap manager will be provided one week before the due date, but nothing prevents your writing your own little test program.