SHM replacement based on ASHMEM
问题 I'm working on a library port from *nix to Android, and the library uses shared memory or shm . Android does not have System V shm . Instead it uses ashmem . Is anyone aware of a shim library to map shm calls into ashmem ? Google has not been very helpful. 回答1: This is how it worked for me while working with a similar problem of porting: Instead of using shmfd = open(SHM_PATH, O_RDWR) for creating and getting file descriptor I replaced it with int fd = ashmem_create_region("SharedRegionName",