From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3a6754711ac14f3e X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-26 09:55:42 PST Path: nntp.gmd.de!Germany.EU.net!netmbx.de!zrz.TU-Berlin.DE!math.fu-berlin.de!zib-berlin.de!gs.dfn.de!news.dfn.de!darwin.sura.net!europa.eng.gtefsd.com!howland.reston.ans.net!vixen.cso.uiuc.edu!peltz From: peltz@cerl.uiuc.edu (Steve Peltz) Newsgroups: comp.unix.osf.osf1 Subject: Re: Q: "orphaned" shared memory segments Date: 26 Jul 1994 16:43:19 GMT Organization: CERL - University of Illinois at Urbana-Champaign Message-ID: <313ef7$dtg@vixen.cso.uiuc.edu> References: NNTP-Posting-Host: unicorn.cerl.uiuc.edu In article , David Potter wrote: >This is quite normal for shared memory. Even programs that >end normally leave their shared memory around, unless they explicitly >remove it. More than normal; it is required behavior. A program can detach, then re-attach, and expect to find data still there. I don't think that segments that are not currently mapped into a process are actually locked into physical memory, even if they aren't deleted. As far as I can tell, they only take up swap space (is there a separate swap area for shared memory segments?). Also, it looks to me as if you can delete a segment even while it is in use, and not cause any problems for those processes that already have it attached. In fact, I don't see any real difference between using shared memory segments and doing mmap()/mlock() (except that mlock() is privileged, and you can keep segments persistent over a reboot, and you have more flexibility as to naming a segment - the whole UNIX file system name space).