Anonymous SHared Memory
originally an Android facility to allow more reclaim opportunities in swapless systems.
- Large application needs to cache expensive operations. But, these operations are _less_ expensive than swapping and less expensive than if the app got, for instance, OOM-killed. The Android browser uses this to store decompressed images so it can draw them to the screen. It can always decompress them again, and a swapped-out decompressed image is pretty worthless.
Producer -> Consumer Model :
- Intermittent Use. Generally smaller applications that run only occasionally, and not for long periods of time.
- Obviously contrived example: "grep" could keep the results of a grep through a large file in an ashmem cache. If you did the same grep twice, you could return the cached result instead of reading the large file again.
- This kind of use does not fit well with a model where VMAs are used to track volatility. There generally is not a VMA around since the program only runs for a short time. If a VMA would be required to indicate the reclaim state of a page, then it could not be reclaimed most of the time.