• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Memory usage measurement questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Memory usage measurement questions
      • From: Rick Mann <email@hidden>
References: 
 >Memory usage measurement questions (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Counting header includes
  • Next by Date: Re: xcode - missing library
  • Previous by thread: Re: Memory usage measurement questions
  • Next by thread: Re: Memory usage measurement questions
  • Index(es):
    • Date
    • Thread