#include <mach/shared_memory_server.h> not included by <mach/mach.h> — include it explicitly

mach/shared_memory_server.h

File: mach/shared_memory_server.h protos and struct definitions for shared library server and interface
7 macros · 2 functions · 1 struct

macroVM_PROT_COW

#define VM_PROT_COW 0x8
must not interfere with normal prot assignments

macroVM_PROT_ZF

#define VM_PROT_ZF 0x10
must not interfere with normal prot assignments

macroGLOBAL_SHARED_TEXT_SEGMENT

#define GLOBAL_SHARED_TEXT_SEGMENT 0x90000000U

macroGLOBAL_SHARED_DATA_SEGMENT

#define GLOBAL_SHARED_DATA_SEGMENT 0xA0000000U

macroGLOBAL_SHARED_SEGMENT_MASK

#define GLOBAL_SHARED_SEGMENT_MASK 0xF0000000U

macroSHARED_TEXT_REGION_SIZE

#define SHARED_TEXT_REGION_SIZE 0x10000000

macroSHARED_DATA_REGION_SIZE

#define SHARED_DATA_REGION_SIZE 0x10000000

structshared_region_range_np

All shared_region_* declarations are a private interface between dyld and the kernel.
size 16, align 8
mach_vm_address_tsrr_address
mach_vm_size_tsrr_size

functionshared_region_map_file_np

int shared_region_map_file_np(
	int fd,
	uint32_t mappingCount,
	const struct shared_file_mapping_np *mappings,
	int64_t *slide_p
)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/kern/syscalls.master, osfmk/mach/shared_memory_server.h
Obsolete; the system call was removed (its slot returns ENOSYS) and its header, shared_memory_server.h, is itself deprecated in favor of shared_region.h. Formerly mapped ranges of the file open on fd into the system shared region, optionally returning the slide applied. dyld now sets up the shared cache with shared_region_map_and_slide_2_np.

functionshared_region_make_private_np

int shared_region_make_private_np(
	uint32_t rangeCount,
	const struct shared_region_range_np *ranges
)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/kern/syscalls.master, osfmk/mach/shared_memory_server.h
Obsolete; the system call was removed (its slot returns ENOSYS) and its header, shared_memory_server.h, is deprecated. Formerly gave the calling process a private copy of the listed address ranges of the global shared region so they could be modified without affecting other processes.