Re: Memory usage measurement questions
Re: Memory usage measurement questions
- Subject: Re: Memory usage measurement questions
- From: Paul Sargent <email@hidden>
- Date: Sat, 15 Mar 2008 17:49:15 +0000
On 14 Mar 2008, at 20:33, Rick Mann wrote:
Why so much memory used? I guess I can forgive virtual memory use,
but 200 MB of real mem? And really, does it need almost a gig of vmem?
How can I see more about how this memory is used.
Probably the best tool that I have seen is 'vmmap <pid>'. It will give
you a break down of the virtual memory map for that process, and what
areas are mapped to. Granted, it can be information overload, but it's
quite enlightening.
For example, I ran it on Safari and got this (119M of Stack Guard?!?!?):
bash-3.2# vmmap 4214
Virtual Memory Map of process 4214 (Safari)
Output report format: 2.2 -- 32-bit process
==== Non-writable regions for process 4214
__PAGEZERO 00000000-00001000 [ 4K] ---/--- SM=NUL /
Applications/Safari.app/Contents/MacOS/Safari
__TEXT 00001000-0012f000 [ 1208K] r-x/rwx SM=COW /
Applications/Safari.app/Contents/MacOS/Safari
__LINKEDIT 00168000-00176000 [ 56K] r--/rwx SM=COW /
Applications/Safari.app/Contents/MacOS/Safari
__TEXT 00176000-00185000 [ 60K] r-x/rwx SM=COW /
System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/
SyndicationUI
__LINKEDIT 00189000-00193000 [ 40K] r--/rwx SM=COW /
System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/
SyndicationUI
STACK GUARD 00193000-00194000 [ 4K] ---/rwx SM=NUL
STACK GUARD 00195000-00196000 [ 4K] ---/rwx SM=NUL
shared memory 00196000-00199000 [ 12K] r--/rw- SM=SHM
shared memory 001a1000-001a2000 [ 4K] r--/rw- SM=SHM
__TEXT 001b0000-001b1000 [ 4K] r-x/rwx SM=COW /
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/
libcmm.jnilib
__LINKEDIT 001b3000-001b5000 [ 8K] r--/rwx SM=COW /
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/
libcmm.jnilib
mapped file 001ef000-001f7000 [ 32K] r--/r-x SM=ALI /
private/var/tmp/mds/messages/se_SecurityMessages
__TEXT 00400000-004ef000 [ 956K] r-x/rwx SM=COW /
System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
[..snip..]
CoreGraphics b11b7000-b11bf000 [ 32K] r--/r-- SM=SHM
CoreGraphics b1736000-b173e000 [ 32K] r--/r-- SM=SHM
__TEXT ba900000-ba917000 [ 92K] r-x/rwx SM=COW /
System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
__LINKEDIT ba919000-ba91b000 [ 8K] r--/rwx SM=COW /
System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
__TEXT bab00000-bab22000 [ 136K] r-x/rwx SM=COW /
System/Library/CoreServices/Encodings/libKoreanConverter.dylib
__LINKEDIT bab23000-bab25000 [ 8K] r--/rwx SM=COW /
System/Library/CoreServices/Encodings/libKoreanConverter.dylib
STACK GUARD bc000000-bf800000 [ 56.0M] ---/rwx SM=NUL
STACK GUARD bf800000-bf806000 [ 24K] ---/rwx SM=ZER
==== Writable regions for process 4214
__DATA 0012f000-00137000 [ 32K] rw-/rwx SM=COW /
Applications/Safari.app/Contents/MacOS/Safari
__OBJC 00137000-00167000 [ 192K] rw-/rwx SM=COW /
Applications/Safari.app/Contents/MacOS/Safari
__IMPORT 00167000-00168000 [ 4K] rwx/rwx SM=COW /
Applications/Safari.app/Contents/MacOS/Safari
__DATA 00185000-00186000 [ 4K] rw-/rwx SM=COW /
System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/
SyndicationUI
__OBJC 00186000-00188000 [ 8K] rw-/rwx SM=COW /
System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/
SyndicationUI
__IMPORT 00188000-00189000 [ 4K] rwx/rwx SM=COW /
System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/
SyndicationUI
MALLOC (freed?) 00194000-00195000 [ 4K] rw-/rwx SM=PRV
MALLOC_LARGE 00199000-0019a000 [ 4K] rw-/rwx SM=PRV
DefaultMallocZone_0x200000
ATS (font support) 0019a000-0019b000 [ 4K] rw-/rwx SM=SHM
shared memory 0019b000-0019c000 [ 4K] rw-/rw- SM=SHM
MALLOC_LARGE (freed?) 0019c000-0019f000 [ 12K] rw-/rwx SM=COW
VM_ALLOCATE ? 0019f000-001a1000 [ 8K] rw-/rwx SM=PRV
MALLOC_LARGE 001a2000-001a6000 [ 16K] rw-/rwx SM=PRV
DefaultMallocZone_0x200000
Memory tag=240 001a6000-001a7000 [ 4K] rw-/rwx SM=PRV
MALLOC_LARGE 001a7000-001b0000 [ 36K] rw-/rwx SM=PRV
DefaultMallocZone_0x200000
__DATA 001b1000-001b2000 [ 4K] rw-/rwx SM=COW /
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/
libcmm.jnilib
__IMPORT 001b2000-001b3000 [ 4K] rwx/rwx SM=COW /
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/
libcmm.jnilib
[..snip..]
CG backing stores b155c000-b15a0000 [ 272K] rw-/rw- SM=SHM
CG backing stores b19fc000-b1a0f000 [ 76K] rw-/rw- SM=SHM
CG backing stores b23d1000-b2444000 [ 460K] rw-/rw- SM=SHM
CG backing stores b36bb000-b3aea000 [ 4284K] rw-/rw- SM=SHM
__DATA ba917000-ba918000 [ 4K] rw-/rwx SM=COW /
System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
__IMPORT ba918000-ba919000 [ 4K] rwx/rwx SM=COW /
System/Library/CoreServices/Encodings/libJapaneseConverter.dylib
__DATA bab22000-bab23000 [ 4K] rw-/rwx SM=COW /
System/Library/CoreServices/Encodings/libKoreanConverter.dylib
Stack bf806000-bffff000 [ 8164K] rw-/rwx SM=ZER
thread 0
Stack bffff000-c0000000 [ 4K] rw-/rwx SM=COW
==== Legend
SM=sharing mode:
COW=copy_on_write PRV=private NUL=empty ALI=aliased
SHM=shared ZER=zero_filled S/A=shared_alias
==== Summary for process 4214
ReadOnly portion of Libraries: Total=144.3M resident=59.6M(41%)
swapped_out_or_unallocated=84.7M(59%)
Writable regions: Total=865.8M written=528.8M(61%)
resident=283.9M(33%) swapped_out=299.9M(35%) unallocated=581.8M(67%)
REGION TYPE [ VIRTUAL]
=========== [ =======]
ATS (font support) [ 27.0M]
CG backing stores [ 5940K]
CG raster data [ 71.6M]
CG shared images [ 3208K]
Carbon [ 5244K]
CoreGraphics [ 204K]
IOKit [ 128.6M]
Java [ 193.1M]
MALLOC [ 377.2M]
Mach message [ 8K]
Memory tag=240 [ 4K]
STACK GUARD [ 119.2M]
Stack [ 21.4M]
VM_ALLOCATE ? [ 19.5M]
__DATA [ 10.4M]
__IMAGE [ 1240K]
__IMPORT [ 820K]
__LINKEDIT [ 7796K]
__OBJC [ 2000K]
__OBJC/__DATA [ 112K]
__PAGEZERO [ 4K]
__TEXT [ 136.7M]
__UNICODE [ 532K]
mapped file [ 114.8M]
shared memory [ 31.8M]
shared pmap [ 1604K]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden