Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!apple!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!ncar!mephisto!prism!gt0178a From: gt0178a@prism.gatech.EDU (BURNS,JIM) Newsgroups: comp.unix.questions Subject: Re: Question about shared memory on UNIX Message-ID: <11012@hydra.gatech.EDU> Date: 3 Jul 90 04:26:21 GMT References: <24844.268f5e69@kuhub.cc.ukans.edu> Organization: Georgia Institute of Technology Lines: 19 in article <24844.268f5e69@kuhub.cc.ukans.edu>, jian@kuhub.cc.ukans.edu says: > > As what I understand, shared memory on Unix means two or more processes > share a common physical memory segment. That implies I can't dynamically > create memory segments to be shared by other processes. Am I right? If I am Incorrect. Using shmget(2), shmop(2) (shmat(), shmdt()), and shmctl(2) in SysV, you can do this. An excellent tutorial on this is in the chapter on shared memory in HP's Real Time I/O Programming Manual (I have the version for the Series 9000/800). Basically, you can obtain a shared memory id that other processes can find, if you wish them to, and allocate a block of memory (a pointer is returned). You must then use this pointer to implement your linked list, within the constraints of the size of memory you requested. -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu