Moving GC

Sergey Gromov snake.scaly at gmail.com
Fri Dec 12 14:10:34 PST 2008


Fri, 12 Dec 2008 15:05:46 +0000 (UTC), dsimcha wrote:

> I've been playing around with custom memory allocation schemes for some
> programs, which are based on regions.  These work great, and are significantly
> faster for the use cases I'm using them for, than the general allocation
> scheme.  However, everything would break if it were used with reference types
> and a moving GC because, as far as the GC knows, the regions I'm allocating
> from it are untyped.
> 
> What are the odds that some D implementation gets a moving GC in the
> foreseeable future?  Are they significant enough that I should avoid relying
> on the GC being non-moving, or is worrying about such things just overdoing
> trying to be future-proof?

Is this at all possible for a conservative GC to be moving?  It's one
thing when some unused memory is kept allocated due to false pointers,
and another when some data resembling pointers changes unpredictably.

And GC is to stay conservative as long as unions are supported.



More information about the Digitalmars-d mailing list