Skip to main content
Zinc supports Linux and macOS on x86_64 and aarch64. Windows is unsupported. The core CI matrix includes Linux x86_64, Linux aarch64, and macOS; adapter jobs run on Linux and macOS.

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_-].
Capacity is limited by available shared-memory backing space, address space, and process limits. 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 through vm.max_map_count. Each Zinc mapping uses a virtual memory area, alongside the process’s other mappings.
If an application needs more mappings than the configured limit, an administrator can raise it with 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.

Cleanup and data access

Closing the creator removes the name on both platforms. Existing mappings remain valid until their handles close. A creator crash can leave a stale name; Zinc does not recover it automatically. Notify/wait establishes release/acquire ordering, but does not provide mutual exclusion. Coordinate writes and reads with atomic data or an application protocol. Shared memory is volatile and carries no disk durability guarantee.