Is a moving GC really needed?

Marcio mqmnews123 at sglebs.com
Wed Oct 4 14:34:59 PDT 2006


Lionello Lunesu wrote:
> I've noticed that some design decisions are made with the possibility of 
> a moving GC in mind. Will D indeed end up with a moving GC? If so, why? 
> Is a moving GC really worth the extra trouble?

	Some people claim that a program that runs for a long time (web server, 
servlet container etc) would fragment memory so bad that eventually you 
can run out of RAM even though you still have lots.

	That is not a theory. This has been reported to me by a close friend 
who works for a big company which I will not name. A new JVM with a GC 
that moved objects solved the problem their customer was having.

	A GC that moves objects can compact memory and avoid the fragmentation.

	I also don't see how a moving GC can live with the D features. I know 
that having a non-moving GC can have people produce code that is not 
portable across compiler implementations. I have seen this happen with 
code for SmartEiffel versus ISE Eiffel for example. Using SmartEiffel, 
people cached pointers to Eiffel objects from C DLLs etc. Worked in 
SmartEiffel (non-moving GC), but not in ISE Eiffel (moving GC).


marcio



More information about the Digitalmars-d mailing list