Re: Why is virtual memory so high? (crash)
Re: Why is virtual memory so high? (crash)
- Subject: Re: Why is virtual memory so high? (crash)
- From: Mario Emmenlauer <email@hidden>
- Date: Wed, 21 Jan 2009 11:57:54 +0100
Hi Justin,
Justin C. Walker wrote:
On Jan 20, 2009, at 08:43 , Mario Emmenlauer wrote:
Shawn Erickson wrote:
On Mon, Jan 19, 2009 at 1:18 AM, Mario Emmenlauer
<email@hidden> wrote:
I have a large C/C++ project with thousands of lines of code and
many thirdparty-libraries. When it startes up, it reserves around 1.8GB
of virtual memory (40MB real memory), and I don't know why.
Are there better/other tools I could try to inspect where the
additional vmem is reserved?
vmmap
Thanks! I used vmmap, it claims ~600MB should be used by my
process. Activity Monitor instead shows 1220MB virtual memory
usage, twice as much. Who is right? Am I doing something wrong?
The two could be using different algorithms to account for pages. Might
be worth filing a bug report with examples.
Seems I'm stuck again. The 1.2GB that Activity Monitor shows are
correct, since my application crashes after reserving 2.7GB real mem.
vmmap instead (incorrectly?) claims only 600MB whould be used (which
is still a lot for an idle GUI app with only 60MB real memory).
I must be missing something!
By the way, what is IOKit with 281MB and STACK GUARD with 56MB?
Both seem unreasonably high...
Stack guard chunks are 1 page, so I suspect that vmmap is just lumping
claimed but unallocted VM to that category (possibly a [more or less
harmless] bug). For IOKit, I can't say for sure. Are you mapping lots
of memory? I notice that Safari has a 250MB chunk allocated to IOKit,
while python has nothing of that type.
firefox (freshly started) uses 1.2GB virtual mem (vs 80MB real mem),
and other programs (smartcvs, ...) have these unrealistic high numbers
too. Can I explicitly "un-map" or "close" IOKit, STACK GUARD, __TEXT
and others?
Cheers,
Mario
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden