There’s a great paper from the group of Emery Berger, where they merge memory pages that become sparse. A kind of garbage collection for C and C++ languages. There’s also a good presentation about it on youtube.
https://arxiv.org/abs/1902.04738
The presentation: https://youtu.be/c1UBJbfR-H0