About compiler memory consumption
H. S. Teoh
hsteoh at quickfur.ath.cx
Wed Dec 4 09:45:09 PST 2013
On Wed, Dec 04, 2013 at 05:28:06PM +0100, Dicebot wrote:
> While in general one may expect CTFE/template memory consumption to
> drop considerably, in vibe.d case it is unlikely to make that much
> of an impact. vibe.d does really lot of computations during
> compile-time, for example, all Diet templates get loaded and
> processed during that phase. I can't imagine optimizations that will
> make possible to fit compilation of any vibe.d project of notable
> size in 512Mb memory. To be honest, I'd hate to do any DMD + vibe.d
> development on anything less than 4Gb of RAM.
Even without vibe.d, dmd eats way too much memory to be usable on a
machine with 512MB RAM. I was quite disappointed to discover this when I
tried running dmd on a not-that-old machine with 512MB RAM (aka my
office PC), and every time it would soak up all available RAM, force my
browser (and probably significant parts of X11) to swap out, making the
PC generally unresponsive for several seconds, before the dmd process
exits and everything goes back to normal.
For all of the good points of D and dmd's compile speeds, the one thing
I can't recommend dmd for is efficient memory usage, sad to say. Of
course, on a machine with more available RAM, dmd runs at lightning
speed, so that at least is a redeeming quality.
T
--
Guns don't kill people. Bullets do.
More information about the Digitalmars-d-learn
mailing list