[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
RAM size measurement
From: Narasimha Reddy K ####@####.#### Date: 30 Mar 2002 04:36:04 -0000 Message-Id: <5575473D4532D411BE4C009027E8C838068E66D8@MASBLREXC02> 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? rgs, NR DISCLAIMER: Information contained and transmitted by this E-MAIL is proprietary to MASCOT SYSTEMS LTD and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at ####@####.#### Before opening attachments, "Please scan for Viruses" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 -- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |