Quiz submission record for quiz2-1-1 at Sun Jun 27 21:20:06 2004: Your Answer for Question 1: a and c are false. b is true. A is false because it says "always". malloc may break up a free block into two blocks, one for use by malloc and whatever is left over to be left free. This leaves the number of free blocks after the operation equal to the number of free blocks from before. This also means b is true. C is false because you can only either have the same number of free blocks or lose one free block after a malloc call. You cannot increase the number. Your Answer for Question 2: a is false, b is true, c is true, d is false. A is false, because free can combine the freed space with an existing adjacent free space and keep the number of free spaces constant. This also means B is true. C is true because you could have a space to be freed with existing free spaces before and after you free that space, the two other spaces will combine with the new space and make one free block, thus reducing the number of free blocks by one. But this is the best case for combining blocks, so you cannot reduce the number by more than one, so d is false. Your Answer for Question 3: Allocation in Java is automatic and hidden from the user, so malloc is handled by a hidden allocation method by Java. The Java equivalent to free is the routine generational garbage collection done by the Java Virtual Machine. An automatic memory allocation/deallocation system cannot be put in C because C can cast pointers (even void ones) returned by dynamic allocation, whose lifetime could last the entire program span. Because of their possible unstable nature, an automatic allocation/deallocation is not possible. Your Answer for Question 4: Yes, this structure can be reclaimed with reference count. When an object has nothing pointing to it, it cannot be accessed and those reference count will delete it (the object will have a reference count of zero). The top-left object has nothing pointing to it and will thus be reclaimed. No, this structure cannot be reclaimed with mark and sweep. Starting from the top-left object, you can follow the pointers all the way that they will "mark" all four objects, keeping them safe from reclaiming. Your Answer for Question 5: Not sure about how memory is truly represented and how it is allocated/freed. Need an in class example. Also, not sure of why C cannot automatically allocate/deallocate memory. Your unique submission ID is quiz2-1-1-cs61c-ev-1088396406-18.