ASharedMemory allows allocating shared memory as a file descriptor that can be mmaped or shared to other processes via parcels or Unix domain sockets.
Its Java counterpart is android.os.SharedMemory from which (when available as a JNI jobject) an owned file descriptor clone can be created to access the memory object in native code.
Common Rust traits such as FromRawFd are provided so that a SharedMemory object can also be created from a received file descriptor.
ASharedMemory
allows allocating shared memory as a file descriptor that can bemmap
ed or shared to other processes via parcels or Unix domain sockets.Its Java counterpart is
android.os.SharedMemory
from which (when available as a JNIjobject
) an owned file descriptor clone can be created to access the memory object in native code.Common Rust traits such as
FromRawFd
are provided so that aSharedMemory
object can also be created from a received file descriptor.