• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

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.
0
shinymoon
Asked:
shinymoon
2 Solutions
 
omarfaridCommented:
Hi,

You need to clean it yourself with

ipcrm -m shmid

ipcs -m will list shared memory on your system
0
 
ravenplCommented:
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

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now