Lots of stuff on macOS gone weird / mental. Try to allocate large blocks of memory in a dynamically loaded function. The pointer you get back is a raw non-virtual pointer, then you need to use non-posix calls to map that region into your process's virtual memory space.