On Sat, Feb 16, 2013 at 12:12:38PM +0100, Maxim Fomin wrote: > On Saturday, 16 February 2013 at 09:37:12 UTC, deadalnix wrote: > >And that critical size isn't very large. > > > >I cannot compile anymore : > >Unable to fork: Cannot allocate memory > > > >I cannot use separate compilation to mitigate the problem as some > >symbol are not emitted properly (so I get linker errors). > > > >Hopefully, dmd is fast because it doesn't use any GC. > > Wasn't this a problem long before? My D environment on linux fails > to unittest Phobos code with exactly same error message and I > remember this was discussed in newsgroups.
This is still the situation, depending on how much memory your machine has. I used to run the Phobos unittests with make -j6 to speed things up, but recently I can't do it anymore without getting the above error message, because std.algorithm will consume all the memory, leaving no room for the others. I remember having DMD do that on me as well, when one time I used std.regex.ctRegex a bit too eagerly. I think (part of?) the problem is that CTFE allocates memory but never frees it, so too much CTFE will cause DMD to run out of memory. T -- Spaghetti code may be tangly, but lasagna code is just cheesy.
