logoalt Hacker News

justmedepyesterday at 10:11 PM1 replyview on HN

You can even mmap a socket on some systems (iOS and macOS via GCD). But doing that is super fragile. Socket errors are swallowed.

My interpretation always was the mmap should only be used for immutable and local files. You may still run into issues with those type of files but it’s very unlikely.


Replies

kelnostoday at 1:42 AM

mmap is also good for passing shared memory around.

(You still need to be careful, of course.)

show 1 reply