pynbody.array.shared.posix_detail#
POSIX-specific shared memory implementation.
Uses Python’s internal _posixshmem module instead of ctypes calling libc directly. This is necessary because on macOS, ctypes has issues with shm_open permission handling that cause “Permission denied” errors when opening existing shared memory segments. The reason for this is unclear. However, the _posixshmem module (used internally by multiprocessing.shared_memory) handles the system calls correctly on all POSIX platforms.
Functions
Clean up all POSIX shared memory segments - handled by individual unlinks |
|
|
Create POSIX shared memory segment using _posixshmem module. |
|
Get information about a shared memory segment - not needed for POSIX |
|
Open existing POSIX shared memory segment using _posixshmem module. |
|
Reconstruct shared memory for cross-process sharing |
|
Unlink POSIX shared memory segment using _posixshmem module. |