Re: Memory usage measurement questions
Re: Memory usage measurement questions
- Subject: Re: Memory usage measurement questions
- From: "Mark Wagner" <email@hidden>
- Date: Fri, 14 Mar 2008 13:40:47 -0800
On 3/14/08, Rick Mann <email@hidden> wrote:
> Hi. I've written a tiny little command-line tool that installs a
> CGEvent tap and then enters a CFRunLoop(). It links against
> ApplicationServices and CoreServices and calls printf().
>
> I wasn't sure if I was properly releasing some things, so I decided to
> take a peek at the memory usage in ActivityMonitor. I was shocked to
> learn that the app uses (even just after launch) 200 MB of real
> memory, and 842 MB of virtual memory. The executable is only 13K.
>
> 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?
I suspect it has to do with how the OS tracks memory usage. Most
operating systems will treat shared memory (shared libraries and the
like) as being used once by each program that loads the library, so
your 200 MB may actually be mostly a 200-MB chunk of system libraries
that's shared among all running processes.
--
Mark Wagner
_______________________________________________
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