Quiz submission record for quiz2-1-1 at Mon Jun 28 10:53:24 2004: Your Answer for Question 1: B is the only true answer. Since when a block is found in the first-fit search that is larger than the requested space. The end of the block is used for the allocation and the begining simply has its size adjusted. This can keep the number of blocks unchanged. It is possible that the number of blocks may decrease if a whole block is allocated, but it can never increase. Your Answer for Question 2: B & C are both true. If a block is freed that is between two other free blocks, they will be combined and the number of blocks will be reduced by one. There is no provision to remove more than one block. Also if a block borders just one other free block, the number of free blocks remains unchanged. Your Answer for Question 3: In java you can 'new' and object. There is no direct equivalent to free in Java; Java uses a hybrid generational garbage collector to collect no longer reachable objects. C premits programs to cast void points to and from pointers of any type, including large integers, so determining which objects are pointed to can be tricky. Also, since pointers can't be redirected trivially, since the may be present in many places, defragmenting the heap is near impossible, unlike Java. Nonetheless people have modified compiliers and put some restricitions on C code to do mark and sweep garbage collection. Your Answer for Question 4: The reference count method will not reclaim this structure since all of the objects still have a count of one, even though the are not currently reachable, because there is a circular reference. The mark and sweep method would succesfully relcaim this object since it would not encounter it during a sweep from the roots, and would then sweep it. Your Answer for Question 5: The code in K & R took some time to digest. The storage management notes online were excellent though. I readily understood it. I like K & R, but they don't annotate the code in the latter half of the book as much as they do in the first. Your unique submission ID is quiz2-1-1-cs61c-cm-1088445204-3225.