View in context in the libbitcoin Slack #general mirror.
The problem isn't allocation—it's mmap itself on macOS for large files (>1GB per mapping, especially on APFS). Windows (SetEndOfFile / CreateFileMappingW) and Linux (mmap with native fallocate) handle large shared mappings reliably, but macOS has a long-standing kernel bug/limitation causing mmap failures or hangs for large files, even with preallocation. Here's the breakdown and fixes.(edited)