Sean Kelly wrote:
dsimcha wrote:
What are the odds that some D implementation gets a moving GC in the
foreseeable future?
Minuscule. The GC isn't provided nearly enough type information to
safely move memory right now, and I don't see that changing any time soon.
Sean
An related case that could probably be done is pure functions. Inside a
pure function, all allocations could be made on a 'pure heap' instead of
the normal heap. When returning from a pure function back into a
non-pure function, copy the return value into the normal heap (moving it
in the process). Then discard the entire pure heap.
(This is a *huge* win if the return value from the pure function is a
POD, and the pure function does extensive memory allocation).
Of course, that's more like a memory pool rather a gc.