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: Mon, 26 Jan 2009 13:52:40 +0100
Hi,
Eric Gouriou wrote:
On Jan 21, 2009, at 9:45 PM, Justin C. Walker wrote:
On Jan 21, 2009, at 02:57 , Mario Emmenlauer wrote:
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!
Now it became even more obscure: Suddenly my application uses only
600MB VMEM (without me actually changing anything). Both vmmap and
Activity Monitor report ~600MB VMEM. On my coworkers Machine (100%
identical), the problem persists. The App still uses ~1200MB VMEM
according to Activity Monitor, but 600MB according to vmmap.
vmmap even reports (almost) identical VMEM usage on both Machines.
Try this: In Activity Monitor, select View->Columns->Shared Memory,
and see what happens.
Shared memory is very low (~20MB).
Since I don't have the code for either vmmap or Activity Monitor (and
since I would not want to spend any time wading into the Mach VM tar
baby), I can't tell for sure what's going on, but I think the answer
for you is that the two programs are telling you different things.
Activity Monitor, top and vmmap all have slightly different heuristics
for what they
report.
I'm pretty sure Activity Monitor is correct, because the App crashes
exactly at the time when Activity Monitor reports 4GB VMEM usage.
>>>> [...]
>>>>
As I said, I'm not wading into the Mach VM code to grok what's going
on there, but someone else may be able to shed some light.
What problem are you trying to tackle here? You may be chasing
chimaeras...
I'm trying to find out why my application can use only ~2.8GB (instead
of the full 4GB for a 32bit app) on a 10GB Machine. For some reason, the
app consumes ~1.2GB VMEM for no apparent reason.
I would not care, but customers complain a lot that 2/7th of memory gets
waisted. The same code on Windows works flawless.
Best regards,
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