Which of the following heap memory E allocation strategies is likely to…
2023
Which of the following heap memory E allocation strategies is likely to exploit spatial locality of memory accesses in a program, the most?
- A.
Best fit
- B.
next fit
- C.
last fir
- D.
first fit
Attempted by 15 students.
Show answer & explanation
Correct answer: B
Next Fit is the strategy that best exploits spatial locality. It continues searching from the last allocated position, clustering new memory blocks near previous ones in the heap. This reduces the distance between related data objects compared to First Fit or Best Fit, which may scatter allocations.