The existing shm.rs attempts to be portable by using the sharedmem crate to create and open shared memory regions in an OS-agnostic way. This requires creating and removing temporary files, which can run into various issues due to interactions with other processes in the filesystem. We've already partially changed that on Linux by using memfd as the first preference, which allows an anonymous mapping to be created without a temporary file.
e8b41a6 simplifies the SharedMem interfaces by removing SharedMemReader, SharedMemWriter, SharedMemSlice, SharedMemMutSlice and replacing them with a single SharedMem that implements the core API required.
63c256f introduces a Windows-specific SharedMem that allows anonymous mappings to be created via Win32's CreateFileMapping and MapViewOfFile APIs. This also drops the sharedmem crate dependency for Windows builds.
dc3437e clarifies a few PlatformHandle uses and adds some additional comments.
The existing
shm.rs
attempts to be portable by using thesharedmem
crate to create and open shared memory regions in an OS-agnostic way. This requires creating and removing temporary files, which can run into various issues due to interactions with other processes in the filesystem. We've already partially changed that on Linux by using memfd as the first preference, which allows an anonymous mapping to be created without a temporary file.e8b41a6 simplifies the SharedMem interfaces by removing
SharedMemReader
,SharedMemWriter
,SharedMemSlice
,SharedMemMutSlice
and replacing them with a singleSharedMem
that implements the core API required.63c256f introduces a Windows-specific
SharedMem
that allows anonymous mappings to be created via Win32'sCreateFileMapping
andMapViewOfFile
APIs. This also drops thesharedmem
crate dependency for Windows builds.dc3437e clarifies a few
PlatformHandle
uses and adds some additional comments.These changes are intended to address https://bugzilla.mozilla.org/show_bug.cgi?id=1679500