Tag
Track free intervals by address and size, merge on free, and implement both allocation policies in Java and Python.