Re: help with huge memory consumption??
- From: Dan Miller <dan@xxxxxxxxxxxxxxx>
- Date: Thu, 01 Mar 2007 20:23:14 -0600
"Bin Chen" <binary.chen@xxxxxxxxx> wrote in news:1172800927.866571.297090
@8g2000cwh.googlegroups.com:
On 3ÔÂ2ÈÕ, ÉÏÎç9ʱ38·Ö, Dan Miller <d...@xxxxxxxxxxxxxxx> wrote:explicit
I'm running a utility on kernel 2.6. When I run "ps aux", it shows my
utility as using 109MB of memory!!
root 5817 5.3 0.2 109132 1172 ? Ssl 18:01 1:23
/usr/src/ip3/shad
Total 197535
which is only about 200KB even with debug functions. I have no
usage??malloc or new calls, I open 3 pthreads and one message queue.
I'm trying to figure out where all this memory is getting eaten up!!
I tried looking at /proc/`pidof shad`/status, and it shows
VmData: 106772 kB
which clearly is where my memory is consumed, but I don't know how to
break this down any further.
I've tried running objdump against the utility, but it just documents
essentially the same thing that 'size' does.
Is there anything else I can do to somehow enumerate this memory
hmmm... that was interesting, but doesn't show memory usage of the
There is a possibility that a dynamic library that you linked with
consume a lot of memory, check what libraries that your utility has
linked with by 'ldd'.
libraries:
linux-gate.so.1 => (0xffffe000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4002c000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4003f000)
libm.so.6 => /lib/tls/libm.so.6 (0x400fd000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40120000)
libc.so.6 => /lib/tls/libc.so.6 (0x40128000)
/lib/ld-linux.so.2 (0x40000000)
(BTW, I tell a lie; in this case, I have 14 pthreads running...)
Also, the proc status output shows
VmLib: 2128 kB
Isn't that the library usage?? Or is that just static library usage??
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
.
- Follow-Ups:
- Re: help with huge memory consumption??
- From: Bin Chen
- Re: help with huge memory consumption??
- References:
- help with huge memory consumption??
- From: Dan Miller
- Re: help with huge memory consumption??
- From: Bin Chen
- help with huge memory consumption??
- Prev by Date: Re: help with huge memory consumption??
- Next by Date: Re: help with huge memory consumption??
- Previous by thread: Re: help with huge memory consumption??
- Next by thread: Re: help with huge memory consumption??
- Index(es):
Relevant Pages
|