GC, the simple solution

Sean Kelly sean at f4.ca
Thu Jun 8 16:04:05 PDT 2006


Jeff Parsons wrote:
> 
> What I'm really curious about, however, is how important this is to 
> _other_ people - especially Walter. Would it be reasonable to say that 
> it seems D has been designed largely without long-term real-time 
> performance in mind? Sure, there are workarounds, but I haven't seen 
> anything elegant yet that will let me use D for such applications 
> without making my memory management more complicated than it would have 
> been in C++. Is anything in the works?

The spec doesn't contain any language forbidding such an approach, but I 
don't think the popular compilers will support it by default.  Certainly 
not any time soon, at any rate.  The "problem" with incremental GC is 
that it requires extra code generation for all pointer modifications to 
signal the garbage collector that some re-scanning may be necessary. 
This has obvious performance implications for small apps that don't ever 
actually need to collect, but tends to level out as run time increases. 
   And, of course, the potential for progress guarantees (possible with 
incremental GC, but not at all common) is a huge bonus for realtime 
programming.  That aside, there may be other approaches to garbage 
collection that would make everyone happy and that don't require 
additional code generation.  If you know of one, please say so.  My own 
knowledge of the topic is limited to what I've read in research papers.


Sean



More information about the Digitalmars-d mailing list