Am 02.01.21 um 21:55 schrieb Iain Sandoe: > Thomas Koenig via Fortran wrote: > >>> map_memory image 0 size 1000 offset 0 pagesize 1000 >>> map_memory image 0 size 2000 offset 0 pagesize 1000 > > pagesize 1000? Output is in hex (easy to miss, as I didn't put the 0x into the printf statements :-) > Darwin’s pagesize is 4096 for PPC/X86 and 16384 for Arm64(aarch64). > >>> mmap failed: Invalid argument >> >> That means that a rewrite of shared_memory.c and shared_memory.h >> is required. >> >> I checked the attached program on every Unixoid system I >> could lay my hands on (Linux, AIX, OpenBSD, NetBSD, FreeBSD, >> OpenSolaris), and it passed everywhere.  Seems like MacOS >> is the only one where this particular idiom does not work. > > Perhaps I’m missing what the idiom is here :) The idiom is remapping a shared memory region a second time into memory, starting from the same offset (zero in this case). This is currently used to make the shared memory allocator more simple, and is something that, from Dominique's debugging, does not work on MacOS. It is something that can be worked around (says the person who didn't write the allocatator in the first place :-) but it's additional work. By the way, the original test case I posted to the list had an error, here is an updated one. Best regards Thomas