|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| I'm working on WebKit optimizations and I'd like to know more about the Mach APIs for purgeable memory regions. There are no Mach-level docs included in the OS (why?), and those that I can find by web searching seem obsolete (for example there are several man pages for vm_allocate on random sites, none of have the same parameter list as the actual function in OS X 10.5.) There are no useful hits at all for vm_purgable_control. So far the best reference I've found is PurgeableBufferMac.cpp in the WebKit sources. It shows how to use the calls, but is rather sparse on comments. Some questions I have are: • Do I have to initially vm_allocate a block as purgeable in order to later mark it for purging via vm_purgable_control? Or is it possible to take a regular vm_allocated block and make it purgeable later on? • If that's not possible, would it make sense to use VM_FLAGS_PURGABLE when allocating any block I might possibly want to purge later on? (I.e. for all block sizes >32k, call vm_allocate with the purgeable flag rather than malloc.) Or would it be bad for system performance to have too many potentially-purgeable (but not marked as volatile) blocks around? • Is there a way to inspect a running process and determine how much of its address space is purgeable and/or volatile? The vmmap tool doesn't seem to show these attributes when listing vm_allocate'd regions. And presumably volatile space is still counted in RSIZE. • For testing purposes, is there a way to trigger purging of volatile regions? I'd like to wire up a button or hot-key that could be used to do this, so I could make sure the app doesn't crash and that its RSIZE goes down. Thanks! —Jens |
_______________________________________________ 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
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.