- POSIX : Linux 5.15.0-1079-azure
- Mach-message-passing : MacOS
gcc producer.c -o producer -lrt
gcc consumer.c -o consumer -lrt
- shm_open is part of the POSIX shared memory API, which requires linking with the real-time library (librt) on Linux.
- By default, gcc does not automatically link against
librt
, so you must explicitly specify -lrt.
cd /dev/shm/
- you can check the Shared memory file named "OS"
[[https://docs.darlinghq.org/internals/macos-specifics/mach-ports.html]]
gcc server.c -o server
gcc client.c -o client

