Maybe nobody is worried about this kind of efficency issue anymore, but
I don't like the idea of relocating the heap on two grounds:
1] the startup time required to relocate everything
2] the fact that all that memory becomes non-shared between multiple
These issues are in addition to the problem of how you could do the
relocating in the first place.
However, I do realize that if we could somehow make our memory usage
more like unix standard, it would save a lot of grief in the long run by
reducing or eliminating the chronic problem of each OS release
changing the memory map.
Also, on the plus side, machines have gotten a lot bigger and faster
since the old days, so maybe it's acceptable. I developed my attitudes
toward Lisp memory usage at a time when Lisp was way bigger than any
other application, while this is no longer anywhere near the case. But
I think it's likely that just about every page will need to be dirtied,
because even code objects contain pointers.
I suppose one possibility is that instead of forcibly remapping
everything, we can see if we can get the mappings that we want, and if
not relocate that part of the heap. This would increase our robustness
to heap rearrangement without completely throwing away fast startup and
To me, the idea of getting the unix loader to do the mapping sounds
promising, though I have no idea if it will work.