Linux-MM
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Linux Memory Management

  • Front Page

  • Documentation

  • Internals

  • Projects

  • Academic Research

References

  • LinuxKernelMailingLists

  • MemoryManagementLinks

Related sites

  • Kernel Newbies

  • Memory Management Forum

Wiki

  • Site Editors

  • Side Bar

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents
Revision 3 as of 2017-12-30 01:05:12
LinuxMM:
  • AshMem

Anonymous SHared Memory

originally an Android facility to allow more reclaim opportunities in swapless systems.

Use Cases

  • 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.
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01