previous | start | next

Function Specification: mm_init

      int mm_init(void)

      Description: Initializes the heap:
             (1) Allocates space for: padding, prolog, and epilog
             (2) Initializes the header, footer of the prolog
             (3) Initializes the header of the epilog
             (4) Sets the global pointer to the prolog (payload
                 portion)
             (5) Allocates a free block of size CHUNKSIZE words by
                 calling extend_ heap
             (6) Inserts the free block returned from extendheap into
                 the linked list (or tree) of free blocks.
      Return: 0 for success or -1 if the initial free block
             cannnot be allocated by extend_heap
   


previous | start | next