www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dmd, vibe.d RAM usage when compiling.

reply SrMordred <patric.dexheimer gmail.com> writes:
I never notice this before, but i tried to put a basic hello 
world from vibe.d (like the one that are in the dlang front page 
examples now), into the most basic instance on google cloud (with 
600mb of RAM) and the compilation returned
"Killed
dmd failed with exit code 137."

So I look at the RAM usage and saw that when compiling (with dub) 
it uses 550mb+.

So i´m unable to put hello world to work.

Aren´t this number a bit too high for a basic example?
Jul 11 2017
next sibling parent Cym13 <cpicard openmailbox.org> writes:
On Tuesday, 11 July 2017 at 16:04:52 UTC, SrMordred wrote:
 I never notice this before, but i tried to put a basic hello 
 world from vibe.d (like the one that are in the dlang front 
 page examples now), into the most basic instance on google 
 cloud (with 600mb of RAM) and the compilation returned
 "Killed
 dmd failed with exit code 137."

 So I look at the RAM usage and saw that when compiling (with 
 dub) it uses 550mb+.

 So i´m unable to put hello world to work.

 Aren´t this number a bit too high for a basic example?
They're expected sadly. It's known that D's common style and especially templates quickly leads to huge memory usage. There is work in progress to mitigate the issue such as reducing the size of symbols within the binary but it's not available for the moment.
Jul 11 2017
prev sibling parent Andre Pany <andre s-e-a-p.de> writes:
On Tuesday, 11 July 2017 at 16:04:52 UTC, SrMordred wrote:
 I never notice this before, but i tried to put a basic hello 
 world from vibe.d (like the one that are in the dlang front 
 page examples now), into the most basic instance on google 
 cloud (with 600mb of RAM) and the compilation returned
 "Killed
 dmd failed with exit code 137."

 So I look at the RAM usage and saw that when compiling (with 
 dub) it uses 550mb+.

 So i´m unable to put hello world to work.

 Aren´t this number a bit too high for a basic example?
https://github.com/rejectedsoftware/vibe.d/issues/1787 Same issue on Cloud Foundry;) Single file compilation is slow but a worksround. Kind regards André
Jul 11 2017