Search code examples
memorymemory-managementdynamic-memory-allocation

Does best-fit memory allocation always succeed when worst-fit does?


If not, is there a counterexample?


Solution

  • Using this malloc algorithm visualizer: https://github.com/dmednis/malloc-algorithm-visualizer you can come up with similar counterexamples to this one: https://i.sstatic.net/lL6eS.png