Question about shared memory on UNIX
BURNS,JIM
gt0178a at prism.gatech.EDU
Tue Jul 3 14:26:21 AEST 1990
in article <24844.268f5e69 at kuhub.cc.ukans.edu>, jian at 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 at prism.gatech.edu
More information about the Comp.unix.questions
mailing list