Quiz submission record for quiz2-1-1 at Mon Jun 28 10:44:47 2004: Your Answer for Question 1: a. true; malloc is a call that requests space from the "free list", and thus any non null call will reduce the number of free blocks on the list. b. false, in complement with part a. c. false; I don't recall garbage collection and sweeping are done during a malloc call. Your Answer for Question 2: a. false; if coalescing occurs, many blocks can potentially fuse together, thus leaving you with fewer blocks. b. true, if you free something (giving you one more block) and during the same call two blocks are coalesced together (giving you one less block). As a result, the number of free blocks is still the same. c. false; coalescing searches the entire free list, and would fuse together two adj small blocks if need be d. true; simply coalesce at least two groups of blocks together Your Answer for Question 3: Java doesn't have a equivalent malloc since there's no need for memory management/ Java doesn't have a equivalent free; deallocation is done for you! Because in C you are allowed to manipulate pointers, automatic alloc/dealloc (which needs strict control of pointers and their values) can't be done. Your Answer for Question 4: ref. count: yes, because it's not a circular structure (and not also doubly linked) Thus, eventually all the nodes will eventually have a ref count of 0 (nothing pointing to it), and be collected. mark and sweep: yes, since doing a depth search it will recognize that the top left is the root, and marks which nodes can be reached. If a node is freed, it is unmarked and will get collected during the sweep phase. Your Answer for Question 5: Garbage collection reading is simple enough; implementing it in a program -as well as malloc and free - seems daunting to me. Also, i noticed the PH notes on garbage collection was actually covered a bit during 61b (last lecture). Your unique submission ID is quiz2-1-1-cs61c-cp-1088444687-1218.