Contents
How do I remove a shared memory segment in Linux?
Examples
- To remove the shared memory segment associated with SharedMemoryID 18602 , enter: ipcrm -m 18602.
- To remove the message queue that was created with a key of 0xC1C2C3C3, enter: ipcrm -Q 0xC1C2C3C4.
How do I free up shared memory on Linux?
To clean up a shared-memory object on a Linux system, use the ipcrm command. If you are unfamiliar with the above commands, see their man pages for more information. We recommend cleaning up all the segments that do not have an attached process.