www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What is the memory usage limit on DMD linux?

reply BCS <ao pathlink.com> writes:
current stats:

14min 14sec compile time
~1070MB memory usage (256 actual memeory)

And that's only the 26 productions needed to define expressions!

BTW does anyone known of an command line tool that will given me peak memory 
usage on linux?
Sep 03 2007
next sibling parent reply "Anders Bergh" <anders1 gmail.com> writes:
You can sort the columns in top.

On 9/4/07, BCS <ao pathlink.com> wrote:
 current stats:

 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)

 And that's only the 26 productions needed to define expressions!

 BTW does anyone known of an command line tool that will given me peak memory
 usage on linux?
Sep 03 2007
parent reply BCS <ao pathlink.com> writes:
Reply to Anders,

 You can sort the columns in top.
 
 On 9/4/07, BCS <ao pathlink.com> wrote:
 
 current stats:
 
 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
 And that's only the 26 productions needed to define expressions!
 
 BTW does anyone known of an command line tool that will given me peak
 memory usage on linux?
 
What's where I got the ~1GB number. What I'm looking for is a tool that will allow me to ignore the build and find peak usage after dmd has quit.
Sep 04 2007
parent reply "Anders Bergh" <anders1 gmail.com> writes:
On 9/4/07, BCS <ao pathlink.com> wrote:
 What's where I got the ~1GB number.

 What I'm looking for is a tool that will allow me to ignore the build and
 find peak usage after dmd has quit.
I misunderstood your question, realized that shortly after hitting the reply button. Sorry about that. I can't find anything that would do what you need, however, all I can suggest is writing a script that runs repeatedly, writing to a file how much memory dmd is using. Then when the compilation is complete you can open the file and sort it.
Sep 04 2007
parent BCS <ao pathlink.com> writes:
Reply to Anders,

 On 9/4/07, BCS <ao pathlink.com> wrote:
 
 What's where I got the ~1GB number.
 
 What I'm looking for is a tool that will allow me to ignore the build
 and find peak usage after dmd has quit.
 
I misunderstood your question, realized that shortly after hitting the reply button. Sorry about that. I can't find anything that would do what you need, however, all I can suggest is writing a script that runs repeatedly, writing to a file how much memory dmd is using. Then when the compilation is complete you can open the file and sort it.
so inelegant :(
Sep 04 2007
prev sibling next sibling parent reply mandel <mandel foobar.com> writes:
BCS Wrote:

 current stats:
 
 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
Sounds like a very unusual compile time. How do you do that? Compiling GBs of code? ;-)
Sep 04 2007
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
mandel wrote:

 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
Sounds like a very unusual compile time. How do you do that? Compiling GBs of code? ;-)
Some of the tioport builds took over an hour... (on a reasonable modern cpu machine, that is) That -fall-sources switch to gdmd is *killer*, for large code bases. (although a needed evil) Totally unrelated to these DMD issues, though. --anders
Sep 04 2007
prev sibling next sibling parent reply Jascha Wetzel <"[firstname]" mainia.de> writes:
BCS wrote:
 current stats:
 
 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
 
 And that's only the 26 productions needed to define expressions!
 
 BTW does anyone known of an command line tool that will given me peak 
 memory usage on linux?
 
wow - the worst i've seen is 3-5 minutes and <600mb, but only when optimizing >10000 line switch-statements with >800 cases. without -O, compile times are adequate (<1min). did you try compiling with GDC or DMD on windows?
Sep 04 2007
parent BCS <ao pathlink.com> writes:
Reply to Jascha,

 BCS wrote:
 
 current stats:
 
 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
 And that's only the 26 productions needed to define expressions!
 
 BTW does anyone known of an command line tool that will given me peak
 memory usage on linux?
 
wow - the worst i've seen is 3-5 minutes and <600mb, but only when optimizing 10000+ line switch-statements with 800+ cases. without -O, optimizing compile times are adequate (<1min). did you try compiling with GDC or DMD on windows?
DMD win gives, "symbol name to long my 10K+" errors. Another thing I noted is that the object file is about 100MB (I'm only creating about 40 non trivial funtions and about 40-60 trivial ones) and I'm starting to get link errors. :-b
Sep 04 2007
prev sibling parent reply Christian Kamm <kamm.incasoftware shift-at-left-and-remove-this.de> writes:
BCS wrote:

 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
Possibly you have run into this bug? http://d.puremagic.com/issues/show_bug.cgi?id=1382
 BTW does anyone known of an command line tool that will given me peak
 memory usage on linux?
The man page of the 'time' utility (not the bash buildin) says it'd be able to give peak memory usage. It does not work for me though. Regards, Christian
Sep 04 2007
parent BCS <ao pathlink.com> writes:
Reply to Christian,

 BCS wrote:
 
 14min 14sec compile time
 ~1070MB memory usage (256 actual memeory)
Possibly you have run into this bug? http://d.puremagic.com/issues/show_bug.cgi?id=1382
I don't think so. The only CTFE I use is done well before the memory stops climbing
 BTW does anyone known of an command line tool that will given me peak
 memory usage on linux?
 
The man page of the 'time' utility (not the bash buildin) says it'd be able to give peak memory usage. It does not work for me though.
It looks like that is using the getrusage system call and only about 5 of the values are valid under Linux
 Regards,
 Christian
Sep 04 2007