Linux
POSIX shared memory names appear under/dev/shm/zinc_<name>. The user-supplied name is limited to 250 ASCII characters from [a-zA-Z0-9_-].
kernel.shmmax and kernel.shmall govern System V shared memory, not Zinc’s POSIX objects. Containers often mount a small /dev/shm; size that mount for the workload. Accessing pages without enough backing space can raise SIGBUS.
Notifications use shared futex operations, without FUTEX_PRIVATE_FLAG. notify() always makes a wake syscall. wait() checks the sequence before parking and after waking, and retries interrupted or spurious wakes within its timeout.
Many mappings
Linux limits virtual memory areas per process throughvm.max_map_count. Each Zinc mapping uses a virtual memory area, alongside the process’s other mappings.
sysctl -w vm.max_map_count=<limit> and persist the setting in /etc/sysctl.d/. Choose a limit based on the application’s measured mapping count and available kernel memory. mmap can also fail because of address-space limits or memory pressure.
See proc_sys_vm for the kernel settings.
macOS
Names use the same/zinc_ prefix but do not appear in the filesystem. The user-supplied name is limited to 25 ASCII characters, accounting for the prefix within Darwin’s 31-byte name limit.
Page size can be 16384 bytes on Apple Silicon. Query the system page size rather than assuming 4096 bytes.
The notification fallback checks the sequence for 64 spin iterations, then sleeps for up to 50 microseconds between checks. This reduces idle CPU use, but the scheduler can delay wakeup beyond that interval. A kernel wait backend remains planned.
vmmap <pid> can help inspect mapped memory. ipcs lists System V IPC and does not enumerate these POSIX shared memory objects.
