Conversation

It is actually a useful, well-designed API. It's just a replacement for the legacy /dev/shm API. The unpin/pin features are quite useful too. You could easily set it up so that Chromium/Firefox would use it. It just doesn't make sense that you can only do unpin/pin for ashmem.
2
4
For example, this is the GrapheneOS /proc/1/maps output on a debug build: gist.github.com/thestinger/28c The [anon:name] labelling is the downstream VMA naming feature. I find it useful enough that in a debug build of the OS hardened_malloc makes very good use of it.
2
Large allocations above 16k/128k (depending on config) get randomly sized guard regions on both sides (mmap PROT_NONE, mprotect inner usable area to PROT_READ|PROT_WRITE) and get quarantined on free (overwritten with mmap MAP_FIXED PROT_NONE) with oldest in quarantine unmapped.
1
1
Current feeling is that the slab allocation security properties are better due to having a dedicated region per size class. The large allocations aren't only in the same overall mmap region outside the massive reserved area for slabs, but they're also mixed with dlopen libs, etc.
1
1