NotNull pointers

Daniel Murphy yebblies at nospamgmail.com
Wed Aug 31 21:58:27 PDT 2011


"Jonathan M Davis" <jmdavisProg at gmx.com> wrote in message 
news:mailman.2616.1314834798.14074.digitalmars-d at puremagic.com...
>
> As I understand
> it, with regards to CTFE at least, the compiler doesn't collect _any_ 
> memory
> until it's done compiling (since the memory management is easier that 
> way). I
> don't know if templates have the same problem or not.
>
The dmd frontend basically almost never frees any memory.  Running semantic 
generally involves duplicating the entire expression tree.

> There are several bugs
> which have been reported on issues with dmd running out of memory. It 
> doesn't
> appear to be a high priority issue though, since it hasn't been fixed yet. 
> I
> do think that there were some recent improvements to it though (for 
> instance,
> it used to be insanely easy to get startsWith to cause the compiler to run 
> out
> of memory - since it's a recursive template - but that was supposedly 
> fixed
> with the last release).
>

This one was fixed, but not by improving memory management in dmd.  There 
was a bug that caused templates without type specializations to be 
instantiated more than once, and this coupled with a recursive constraint 
caused something like n! templates to be instantiated (and allocated). 




More information about the Digitalmars-d mailing list