Thread overview | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 29, 2013 Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
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 :(
--
Marek Janukowicz
|
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marek Janukowicz | On 8/28/2013 11:53 PM, 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 :(
1. Switch to separately compiling each module, rather than lumping them all on one command line to dmd.
2. Use the 64 bit dmd build. That won't use less memory, but it handles more memory better, if that makes sense.
|
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marek Janukowicz | 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
|
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Hi, Walter. Where i can get 64 bit dmd for windows that produces 32 bit executables ? |
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Temtaime | On 29 August 2013 11:09, Temtaime <temtaime@gmail.com> wrote: > Hi, Walter. > > Where i can get 64 bit dmd for windows that produces 32 bit executables ? The binaries distributed should already be capable of doing that. Just use the -m32 switch. Whether or not you have 32bit libraries installed to allow linking is another question.... :o) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; |
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | http://dlang.org/download.html Here is only 32 bit DMD for windows. |
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Temtaime | It can compile 64 bit apps, but compiler itself is 32 bit. |
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Temtaime | On Thursday, 29 August 2013 at 10:09:07 UTC, Temtaime wrote:
> Hi, Walter.
>
> Where i can get 64 bit dmd for windows that produces 32 bit executables ?
You can compile one yourself, using Visual Studio (the Express editions are free) and the Visual Studio project/solution files included with the source code.
|
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | Am 29.08.2013 16:10, schrieb Vladimir Panteleev:
> On Thursday, 29 August 2013 at 10:09:07 UTC, Temtaime wrote:
>> Hi, Walter.
>>
>> Where i can get 64 bit dmd for windows that produces 32 bit executables ?
>
> You can compile one yourself, using Visual Studio (the Express editions
> are free) and the Visual Studio project/solution files included with the
> source code.
Do you know since when this actually works? I tried this several times but always got tons of compile errors. The latest git revision compiles fine on 64 bit though.
Kind Regards
Benjamin Thaut
|
August 29, 2013 Re: Decrease DMD memory usage | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | Yes, i can. But why Walter cannot compile it and put to downloads? If i compile 64-bit DMD, backend's license forbids me to distribute it? |
Copyright © 1999-2021 by the D Language Foundation