Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!udel!princeton!phoenix.Princeton.EDU!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul Falstad) Newsgroups: comp.unix.programmer Subject: Re: Shared Memory Keywords: SHMGET Message-ID: <6745@idunno.Princeton.EDU> Date: 1 Mar 91 05:17:49 GMT References: <7070@bgsuvax.UUCP> Sender: news@idunno.Princeton.EDU Organization: The Royal Society For Putting Things On Top Of Other Things Lines: 26 pthonda@bgsuvax.UUCP (Killer B) wrote: >encountering the message "Shmget failed :Invalid argument".I tried to >typecast the argumnets to call 'shmget' to the right types but the >problem is still persistent. However after going through manuals I figured That has nothing to do with it, as you probably figured out. The program wouldn't have gotten past compilation if typecasting were the answer. >out that 'shmget' gives this whenever the programs specifies a >shared memory segment size which is less than or greater than the system >imposed limits.Could anyone tell me how to get the system information >about default allowable shared memory segment sizes. SunOS #defines the minimum shared memory segment size as SHMMIN, in /usr/include/sys/shm.h. Your VAX probably doesn't have this, though. A nonportable solution is to do "adb /vmunix" and type "_shminfo+4?X" to get the minimum page size in hex. If all else fails, you're probably not losing much by simply setting your shared memory segment size to whatever the page size is on your machine. -- Paul Falstad, pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD How DO you delete a file called "-"? For viewers at home, the answer is coming up on your screen. For those of you who wish to play it the hard way, stand upside down with your head in a bucket of piranha fish.