nanogui: RAM size measurement


Previous by date: 30 Mar 2002 11:15:43 -0000 Driver info. on XFree86, Narasimha Reddy K
Next by date: 30 Mar 2002 11:15:43 -0000 Timer Event, Srinivas Rao
Previous in thread: 30 Mar 2002 11:15:43 -0000 RAM size measurement, Narasimha Reddy K
Next in thread:

Subject: Re: [nanogui] RAM size measurement
From: Nils Faerber ####@####.####
Date: 30 Mar 2002 11:15:43 -0000
Message-Id: <20020330120732.3027103a.nils@kernelconcepts.de>

On Sat, 30 Mar 2002 10:03:29 +0530
Narasimha Reddy K ####@####.#### wrote:
> I want to know how to figure out how may memory (ram) is required for my
> application itself. Can I trust the figures printed out after the built
> (via size?) or is there a better method (during runtime and/or static)?
> Is there some dynamic memory needed during startup? 

"size" does not tell you anything about DRAM usage at run time. It only
looks at the static code image you have compiled. For some applications
this can give you a very rough estimate but in general the code size is
not at all a measurement for memory footprint at runtime. For example
think of a program that allocates 10MB of RAM and just fills it with
zeros. This can be hacked into minimal code but it will consume 10MB of
RAM. So you should better have a look at the output of "ps -aux" at
runtime. Now comes the difficult part to judge the output. The most
interesting part is the RSS, i.e. the residential size. This is the memory
footprint of your process that is really consumed. Then you should also
look at the VSZ, the virtual size. Here also shared pages are counted,
e.g. shared libraries. If you have two processes using the same shared lib
then those pages are counted for both processes so in fact only half the
amount is really used in DRAM. Better output is using "top" because it
explicitely tells you the shared size. Oh well, here it starts getting
complicated, but I hope you still get the idea :)

> rgs,
> NR
CU
  nils faerber

-- 
kernel concepts          Tel: +49-271-771091-12
Dreisbachstr. 24         Fax: +49-271-771091-19
D-57250 Netphen          D1 : +49-170-2729106
--

Previous by date: 30 Mar 2002 11:15:43 -0000 Driver info. on XFree86, Narasimha Reddy K
Next by date: 30 Mar 2002 11:15:43 -0000 Timer Event, Srinivas Rao
Previous in thread: 30 Mar 2002 11:15:43 -0000 RAM size measurement, Narasimha Reddy K
Next in thread:


Powered by ezmlm-browse 0.20.