site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=puvx57yRzBjgqn2o27sySNNtgKdiUnY3LR6FZlZuWiQ=; b=JX3CoBlIlsjAp1jH2Bg/VaDzfdmOrt8uXn2FxNJkLiL/Aq0JxRSfB67/942v1kVHuRS87uFBz89snMlJ5U+sTbHTPyS10sHNkJUWPNnlNk6oqyuZUssuGOxaHMqQMluKVu3wwSCarlGTcDcCL8nN22SwaPcw6+oFsqDyWEXNRds= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Kt9TiwWEOhny/7bQTVTH2XPIjPIVdzTALvNy6j6Ch3pDGCBM+jZ5IOv8/dHBjfn3OB7MPL4j4Ix9kHhfkPDt0zeBIlMun9y3XfZIv6WMGfn7I5/KaJMbJbDMGs19EdG5fVQO25Wz8CEo5qTVe9QSYXna4DOyFW9T1wvI/VbK5Q4= On Dec 14, 2007 2:50 AM, Stephane Sudre <ssudre@intego.com> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Shawn Erickson