Shared Memory
Paul Falstad
pfalstad at phoenix.Princeton.EDU
Fri Mar 1 16:17:49 AEST 1991
pthonda at 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 at 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.
More information about the Comp.unix.programmer
mailing list