2 ms·
There's no reason to use (the very ancient) SHM API over mmap, not today. You can literally do everything with mmap that you can do with shm, without hitting O
by abcd_f 3y ago
There's no reason to use (the very ancient) SHM API over mmap, not today.
You can literally do everything with mmap that you can do with shm, without hitting OS caps, no performance penalty and with a code that's simpler.
- monocasa 3y agoWell except the sharing memory part. Linux added memfds but macos doesn't have that. I imagine on macos you'd have to use the mach APIs if you're avoiding shm.