You can build fancy balancing trees, heaps and all sorts to try and counteract fragmentation, but then you risk messing up cache coherency and you may spend a lot of time doing tedious busywork that can hold up real work.
What we have now is subobtimal for sure. Particularly if you come along and allocate huge swathes of memory in userland and then release it, only to re-alloc it. Huge page tables help a lot here, from the user/kernel side of things. But of course that is also not a perfect solution. Most apps don't want huge page tables as they don't map well onto normal things like browsing and listening to music. And so it goes; round and round.
Due to a defect in my perf tool I eventually discovered that about 99.2% of processing time was spent on memory management, not instruction processing or network buffer. I was working in a high level garbage collected language, so I could not fine tune adjustments to pointers. Instead I got creative with call stack management and low level data frame header authoring. Now I am trying to replicate that success back to a low level http 1.1 implementation and it’s much more challenging.