This paper on a malloc() replacement that DOES COMPACTION even on C/C++ is making the rounds: https://arxiv.org/pdf/1902.04738.pdf
The GSlice allocator doesn't suffer from the catastrophic fragmentation described in the paper intro. Basically, it has per-thread aches for objects of the same size and it allocates and recycles objects of the same size from a single page, which prevents large fragmentation due to widely varying object sizes.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!