Decrease DMD memory usage

Jonathan M Davis jmdavisProg at gmx.com
Thu Aug 29 00:26:01 PDT 2013


On Thursday, August 29, 2013 08:53:01 Marek Janukowicz wrote:
> How can I decrease DMD memory usage? My program does now use about 3.5GB
> during compilation, which is horrible, as even machines with 4GB RAM
> sometimes fail to compile successfully :(

CTFE and templates (especially CTFE) are currently a real killer for memory, 
so if you're doing a lot of those, you're going to need a lot of memory when 
compiling (this will be fixed in time, but that's the way it is right now). So, 
reducing how much of those you're doing can really help. Probably the simplest 
thing to do though is simply to not compile everything at once.

- Jonathan M Davis


More information about the Digitalmars-d mailing list