Question: This problem will have you analyze the allocation pattern of a memory allocator to assess how different allocation policies affect where data is allocated and

This problem will have you analyze the allocation pattern of a memory allocator to assess how different allocation policies affect where data is allocated and the corresponding fragmentation.
Assume that memory is word addressed and each word in the diagram below holds a single datum. To simplify the problem, assume there are not "header" and "footer" words and only allocate the words indicated in the call to malloc.
The heap is shown below and it is initially empty. (See Image to see the possilbe answers for each part. Note that all 4 parts of the question have the same set of answer options so the list in the image is what is avaible for a,b,c,& d)
a) If the heap is using the first fit policy in allocating blocks, what is the value of p5 after instruction 7th execution?
b) If the heap is using the best fit policy in allocating blocks, what is the value of p5 after instruction 7th execution?
c) If the heap is using the best fit policy in allocating blocks, what is the value of p6 after instruction 10th execution?
d) If the heap is using the best fit policy in allocating blocks, what is the value of p7 after instruction 12th execution?
This problem will have you analyze the allocation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!