Memory usage

  • Follow


Hi!
	I'd like to optimize memory usage of my program. Is there any tool (for 
Linux gcc,g++), which can take snapshoot of running program with details 
about all memory allocations ?
	Or is there any other way to find what "eats" memory ? I was trying to 
use valgrind massif but it shows only heap, which is relatively small (< 
150kB).

Best regards
J
0
Reply jarek 3/25/2010 5:39:24 AM

Hi!

Try glibc's "memusage" tool
0
Reply Peter 3/25/2010 9:28:56 AM


On Thu, 2010-03-25, jarek wrote:
> Hi!
> 	I'd like to optimize memory usage of my program. Is there any tool (for 
> Linux gcc,g++), which can take snapshoot of running program with details 
> about all memory allocations ?

Yes, cat(1).  Just read the file /proc/$pid/status.

> 	Or is there any other way to find what "eats" memory ? I was trying to 
> use valgrind massif but it shows only heap, which is relatively small (< 
> 150kB).

Just? That's usually what you're after.  The only other dynamic things
I can think of is stack and mmap(2)ed things.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .  .
\X/     snipabacken.se>   O  o   .
0
Reply Jorgen 3/25/2010 10:12:21 PM

2 Replies
305 Views

(page loaded in 0.089 seconds)

Similiar Articles:













7/15/2012 10:47:21 PM


Reply: