CS360 Midterm -- March 14, 2002. Question 3 Answer Sheet

void *malloc(int size)
{
  void *retval;

  YOUR DECLARATIONS GO HERE





  /* Code for malloc is here */

  YOUR CODE FOR MALLOC GOES HERE














  return *retval;
}

void *free(void *ptr)
{

  YOUR DECLARATIONS AND CODE FOR FREE GO HERE 
















  /* The rest of free's code is here */
}