|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Oct 31, 2009, at 12:05 PM, email@hidden wrote:
Libraries are mapped; you can't disable caching for mapped data since the VM and the buffer cache are the same thing.
The pages you're interested in are probably already resident.
You have something of a problem here; you want to simulate a launch of Firefox while the Firefox libraries are "cold" but the rest of the system is "hot".
Simulating a fully cold launch isn't hard; write a tool that allocates more virtual memory than you have RAM (at least 2x) and read from each page. This will tend to evict just about every page in the system that isn't being used to run your code. Then free the memory and immediately exec your application. Avoid writing anything to stdout (this will reheat paths in Terminal, CoreGraphics, etc.) or using LaunchServices (will reheat lots of things) to start the app. Likewise avoid having any other apps running, most especially anything that is displaying anything on the UI. Turn off the menubar clock, etc. etc.
Evicting things selectively is harder. You might try writing a tool that installs the libraries by copying them and setting F_NOCACHE on the copy destination descriptors. You should turn Spotlight off before you do this, or it will probably cause your copied files to be cached as it sniffs at them.
If you're trying to catch things that are in the shared (system) cache, your only hope is to reboot.
_______________________________________________ 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
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.