How to Set up Shared Memory in Your Linux and MacOS Programs. (shmget, shmat, shmdt, shmctl, ftok) @JacobSorber
How to Set up Shared Memory in Your Linux and MacOS Programs. (shmget, shmat, shmdt, shmctl, ftok)  @JacobSorber
Uploaded June 2020 | Updated November 2026, 1 day ago
Patreon ➤ patreon.com/jacobsorber
Courses ➤ jacobsorber.thinkific.com
Website ➤ jacobsorber.com
---


How to Set up Shared Memory on Linux and MacOS. (shmget, shmat, shmdt, shmctl, ftok) // This tutorial shows you how to set up shared memory between two or more process in any Unix-style OS, using ftok, shmget, shmat, shmdt, ahd shmctl. Implementation example included.

Related Videos:
Shared Memory with mmap: youtu.be/rPV6b8BUwxM
How programs get memory: youtu.be/XV5sRaSVtXQ
More memory: youtu.be/pKYvhURF3Z4
Make: youtube.com/watch?v=a8mPKBxQ9No
Cloning processes with fork: youtube.com/watch?v=ss1-REMJ9GA
Bit Fields: youtu.be/aMAM5vL7wTs





***

Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.


About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.

More about me and what I do:
jacobsorber.com
https://people.cs.clemson.edu/~jsorber/
http://persist.cs.clemson.edu/

To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [patreon.com/jacobsorber]
+ rep the channel with nerdy merch --- [teespring.com/stores/jacob-sorbers-store]

Source code is also available to Patreon supporters. --- [jsorber-youtube-source.herokuapp.com/]
How to Set up Shared Memory in Your Linux and MacOS Programs. (shmget, shmat, shmdt, shmctl, ftok)Sorting in C: Why the double pointers when sorting pointers? (qsort)I Am Hiring!Stop Studying for Code InterviewsWhat is Unicode?Your Variables are Not Real.Regular Expressions in C (regex, regcomp, regexec)How a process becomes a daemon! (C example)Issues with the pre- and postincrement operator in C, C++, etc.Defining Constants. Should I use CONST or #DEFINE?How to keep your child from becoming a zombie process (C example)?Detect Errors the Easy Way (with AddressSanitizer)
Jacob Sorber |

How to Set up Shared Memory in Your Linux and MacOS Programs. (shmget, shmat, shmdt, shmctl, ftok)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER