Article on code features in C++ by Scott Meyers + sidebar on D implementation by Bartosz Milewski

Christian Kamm kamm-incasoftware at removethis.de
Tue Sep 23 23:16:25 PDT 2008


>>> Compilation times for the D implementation are negligible for up to
>>> seven features. The compilation of eight features took two minutes, and
>>> the compiler run out of memory at nine features.
> 
> You might want to mention that the reason is that the compile-time
> interpreter simply hasn't been fitted with a garbage collector yet.
> Actually there are hooks in DMD for using GC internally -- I think the
> LLVMDC folks experimented with turning it on.  It did make that CTFE
> problem go away, but there was another problem elsewhere that cropped
> up.  LLVMDC folks correct me if I'm wrong on that.
> 
> --bb

That's exactly right. The DMD frontend seems to be developed with the Boehm
GC in mind and we used it at first. It kept CTFE memory usage down. 
However, after an LLVM upgrade we started to get unpredictable segfaults
that went away when we disabled the compiler GC. Since DMD shows the same
memory leaking behaviour, it must also have the GC switched off.

Christian


More information about the Digitalmars-d-announce mailing list