Article View: comp.sys.sun
Article #6571Advice wanted on Shared Memory
From: MPACE
Date: Thu, 17 Jan 1991 23:05
Date: Thu, 17 Jan 1991 23:05
22 lines
1416 bytes
1416 bytes
I am trying to implement shared memory on a Sun 3 workstation, using the shmget() and shmat() system calls to get a shared memory segment and attach a process' address space to it. The shmat() system calls, according to the manual, allows a process to map the shared memory segment to its virtual address space 1) either at an address selected by the system 2) or at an address selected by the process itself. What I need is to map to an address I select (item 2) which is, in fact, the address of a static program variable or of a private memory segment dynamically allocated with malloc(). THIS DOES NOT WORK !! I always get an EINVAL error (illegal address). Does anyone know if it is possible to map a shared segment to a process' address space already allocated for a static variable or dynamically allocated ??? I am almost getting crazy about it !!!! Marco Pace MPACE@ESOC.BITNET
Technical Details
Message-ID:
<1317@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: MPACE@ESOC.BITNET Newsgroups: comp.sys.sun Subject: Advice wanted on Shared Memory Keywords: Miscellaneous Message-ID: <1317@brchh104.bnr.ca> Date: 17 Jan 91 23:05:50 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 22 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 10, Issue 24, message 2 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu