by gumby · 3y ago · 0 comments
Basically: if you need to make a gap, split the page it’s on into two (so your region copy is always less than one page long). You can start the copy into the middle of second page or not (I don’t actually think that’s an optimization in practice but have never measured it).
If you get a lot of fragmentation you can have a background process that does coalescence away from the active insertion point.
I’ve used this technique a few times over the decades in non-editor applications with large sorted vectors.