Quiz submission record for quiz2-1-1 at Mon Jun 28 10:09:02 2004: Your Answer for Question 1: a) This is true because when you call malloc you are allocating a specific size in memory that comes directly from the free space area b) This may be true if there is no available free space or enough to fit the size. But if there is a call to lets say a memory size of 0, then it will still look for a free space of size according to the header file. c) This statement is false because no matter what, malloc will either not change or decrease the size of the free blocks. But if malloc calls the garbage collector in the same instance, thats another case which I believe malloc is not dependent on. Your Answer for Question 2: a) If free is pointing to an actual deallocable piece of memory, then it will increase the amount of free blocks. But if it is not a valid deallocable piece of memory, nothing will increase, or change for that fact. b) If free is positioned to a pointer that cannot be freed or to one non existant, then free will not free anything. c) Free frees blocks, it does not reallocate more memory. For instance if a block a code is freed and it is adjacent to another block of a free code it will combine it thus increasing the free block. If a block of code is freed and it is not adjacent to anything then that piece of memory is free, increasing the number of free blocks. d) False, same response for above. Your Answer for Question 3: A new memory allocation in Jave would use the "new" keyword. To get rid of this new object, the "delete" command is used. The reason Java is like this is because it is programmer friendly and computer friendly, its making sure the programmer does not screw up which screws up the computer thus specific memory address are untouchable: this is what class files are for. Your Answer for Question 4: This will not be reclamied by the reference count because in this algorithm, the pointers all have a count of how many objects point to them. Something is always pointing to something so it will never be removed. If the above structure is not attached to the root at all, DFS won't be able to get it and will not be marked. It will stay there unless a marking is used to mark all the used memory and get rid of everything else. Your Answer for Question 5: I found most interesting the different algorithms used for garbage collections and the way to combine them, such as mark and sweep and genrational garbage collection to be the most efficient. Your unique submission ID is quiz2-1-1-cs61c-eo-1088442542-309.