Re: help with huge memory consumption??
- From: "Bin Chen" <binary.chen@xxxxxxxxx>
- Date: 1 Mar 2007 18:02:07 -0800
On 3月2日, 上午9时38分, Dan Miller <d...@xxxxxxxxxxxxxxx> wrote:
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
Yet "size -A" shows:
size -A shad
shad :
section size addr
.interp 19 134512980
.note.ABI-tag 32 134513000
.note.SuSE 24 134513032
.hash 576 134513056
.dynsym 1200 134513632
.dynstr 738 134514832
.gnu.version 150 134515570
.gnu.version_r 240 134515720
.rel.dyn 24 134515960
.rel.plt 552 134515984
.init 23 134516536
.plt 1120 134516560
.text 62932 134517680
.fini 26 134580612
.rodata 8986 134580640
.eh_frame_hdr 508 134589628
.eh_frame 2636 134590136
.ctors 12 134596868
.dtors 8 134596880
.jcr 4 134596888
.dynamic 232 134596892
.got 4 134597124
.got.plt 288 134597128
.data 64 134597416
.bss 45952 134597504
.comment 742 0
.debug_aranges 344 0
.debug_pubnames 2210 0
.debug_info 35545 0
.debug_abbrev 5428 0
.debug_line 5319 0
.debug_frame 3516 0
.debug_str 9052 0
.debug_loc 9005 0
.debug_ranges 24 0
Total 197535
which is only about 200KB even with debug functions. I have no explicit
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 usage??
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'.
.
- Follow-Ups:
- Re: help with huge memory consumption??
- From: Dan Miller
- Re: help with huge memory consumption??
- References:
- help with huge memory consumption??
- From: Dan Miller
- help with huge memory consumption??
- Prev by Date: Re: Exact mechanics of a system call
- Next by Date: Re: help with huge memory consumption??
- Previous by thread: help with huge memory consumption??
- Next by thread: Re: help with huge memory consumption??
- Index(es):
Relevant Pages
|