Re: Is launchd a RAM addict?
Re: Is launchd a RAM addict?
- Subject: Re: Is launchd a RAM addict?
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 14 Dec 2007 08:52:24 -0800
On Dec 14, 2007 2:50 AM, Stephane Sudre <email@hidden> wrote:
> OK, I think I've found what happens.
>
> I don't know why but the first time you launch an executable on Mac OS
> X (10.4.11), it eats more memory than on further launches.
>
> Here is what I'm seeing:
>
> I've built a Cocoa application (but I can see that with a Foundation
> tool too)
>
> I copy this application (this copy of the application has never been
> launched) to another location.
>
> I open this application through 'open' for instance (it could be done
> with a LaunchDaemon script for a Foundation tool).
>
> => The application eats 12 MB of RAM.
>
> I kill the application and launch it again
>
> => It eats 3-4 MB of RAM
>
> I kill it and launch it again and again
>
> -> It eats 3-4 MB of RAM
>
> I delete the application and replace it with the never launched copy. I
> launch it
>
> => It eats 12 MB of RAM
>
> I kill it and launch it again
>
> => It eats 3-4 MB of RAM.
>
>
> I hope the pattern is obvious now.
It may have something to do with working set cache that Mac OS X can
maintain. On the first launch of an application no usable cache of the
working set exits so it likely loads in more pages then needed when
launched the first time (best guess). On secondary launches it has a
better picture of the working set needed at launch.
Of course countless other things can also play into this...
-Shawn
_______________________________________________
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