Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 24, 2011 D1: out of memory | ||||
---|---|---|---|---|
| ||||
How do I get dmd's memory usage a few hundred MBs down? I keep having to close everything in order not to get an out of memory error while compiling (-w -full). I'd like to get it from 700-800 to below 400 :) Any way to inspect which part is the biggest drain? |
January 24, 2011 Re: D1: out of memory | ||||
---|---|---|---|---|
| ||||
Posted in reply to %u | Er, bit exaggerated.. 450 to below 300 pls :) |
January 24, 2011 Re: D1: out of memory | ||||
---|---|---|---|---|
| ||||
Posted in reply to %u | On 24/01/11 22:14, %u wrote: > How do I get dmd's memory usage a few hundred MBs down? > I keep having to close everything in order not to get an out of memory error > while compiling (-w -full). > I'd like to get it from 700-800 to below 400 :) > Any way to inspect which part is the biggest drain? CTFE and templates will use up the most memory - particularly if you use a lot of strings, as the memory allocated is never freed. You can work around it be compiling files one at a time or a few at a time, so instead of: $ dmd file1.d file2.d Use: $ dmd -c file1.d $ dmd -c file2.d $ dmd file1.o file2.o Note if you're doing this you may like to look into the -op option to avoid object file conflicts which will lead to linker errors. -- Robert http://octarineparrot.com/ |
January 24, 2011 Re: D1: out of memory | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Clipsham | == Quote from Robert Clipsham (robert@octarineparrot.com)'s article
> CTFE and templates will use up the most memory - particularly if you use
> a lot of strings, as the memory allocated is never freed. You can work
> around it be compiling files one at a time or a few at a time, so
> instead of:
> $ dmd file1.d file2.d
> Use:
> $ dmd -c file1.d
> $ dmd -c file2.d
> $ dmd file1.o file2.o
> Note if you're doing this you may like to look into the -op option to
> avoid object file conflicts which will lead to linker errors.
Compiling main alone tops 400MB :D
dmd -c -w proj_1\main.d
The hassle is probably not worth the money for new memory.. if only I wasn't broke :D
|
Copyright © 1999-2021 by the D Language Foundation