Assumptions:
header overhead for pointers are zero memory is word addressed (each word can hold a pointer) the heap is showed below and it is empty Memory address : 1 2 3 4 5 6 7 8 9 10 11 Heap : Now we have the scenario of these instructions: 1: p1 = malloc(3); 2: p2 = malloc(3); 3: p3 = malloc(2); 4: p4 = malloc(3); 5: free(P1); 6: free(p3); 7: p5 = malloc(2); 8: free(p2); 9: free(p4); 10: p6 malloc(6); 11:free(p5); 12: p7 = malloc(6); If the heap is using the first fit policy in allocating blocks, what is the value of p5 after instruction 7th execution? If the heap is using the best fit policy in allocating blocks, what is the value of p5 after instruction 7th execution? If the heap is using the best fit policy in allocating blocks, what is the value of p6 after instruction 10th execution? If the heap is using the best fit policy in allocating blocks, what is the value of p7 after instruction 12th execution?