Quiz submission record for quiz2-1-1 at Mon Jun 28 10:57:16 2004: Your Answer for Question 1: a. False - if the size wanted by the user is not available even though there might be smaller blocks present, it would return false since it would not find the data to allocate. b. True - in order to meet certain size requirements, malloc may use a big block - split it in 2 - return a pointer to have of it and leave the rest as a free block leaving the # of free blocks as unchanged. c. False (I guess this might be a trick question but I do not see how) Your Answer for Question 2: a. False: free might coalesce free blocks next to each other b. True: could happen if the adjacent blocks are not free c. Umm, true? (not really sure) - I guess if it coalesced with the free block in front and behind it, it would reduce it by 1. Don't see how it could reduce it by more than 1. d. False - refer to answer to part c of this question :) Your Answer for Question 3: new There isn't one; java takes care of it on its own. I am not sure if the last part but I am sure it has something to do with pointers. Java does not have pointers whereas C does and they can be of various sizes and attributes and therefore could require different treatments. If Hilfinger's notes for more understandable I would have been able to answer this question completely but from what I gather and I quote,"a language or language implementation that allows arbitrary integers in pointer variables can seriously confuse a procedure trying to follow a trail of pointers through a data structure". I do believe that this would cause problems in C. Your Answer for Question 4: Not using the reference count method since its kind of circular and the reference count wouldn't work as well. Mark and sweep would work better since going down through all the roots, it would be able to ascertain which structures aren't really used and accordingly mark them to be sweeped. Actually, on second thought I am not sure one could do that since this structure links itself together in a weird circular fashion where sweeping one region might affect the rest. Your Answer for Question 5: Mark and sweep and automatic storage reallocation. Do we have to necessarily understand the code used in K&R and PH's notes to understand the lower level memory allocation and deallocation? A better pictoral description of mark and sweep would be useful. Your unique submission ID is quiz2-1-1-cs61c-cf-1088445436-1200.