when does the shared memory get reclaimed??

Hi,

I've got a question....
If I get a shared memory segment and not remove before I terminate my program, the shared memory segment is gonna just sit there, right?
Then, does it ever get reclaimed by itself??

Thx.
shinymoonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
omarfaridConnect With a Mentor Commented:
Hi,

You need to clean it yourself with

ipcrm -m shmid

ipcs -m will list shared memory on your system
0
 
ravenplConnect With a Mentor Commented:
If You interested in automatic shm removal upon lasy process detach use
www.grsecurity.net or http://www.openwall.com/linux/ patch.
Otherwise it will sit there untill removed/rebooted. But note, that it will eventually be moved to swap, and therefore the physical ram will be freed.
0
 
shinymoonAuthor Commented:
thx for the replies
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.