Shared Memory on System V

Kenneth Almquist ka at hropus.UUCP
Thu May 15 08:33:16 AEST 1986


> When reading "shmat(2)" [actually shmop(2)] specification, it seems possible:
> a) To attach a segment of length N at address A
> b) To attach a second segment at address A+N
> c) To address the two segments as a contiguous space.
>
> Is there any ATT specification about such usage of shared memory ?

I think that the manual page covers this.  Step (a) is permissible.
Step (b) is permissible unless A+N is an "illegal address".  What
constitutes an "illegal address" is hardware dependent.  Step (c) is
permissible as far as I can see.

The requirement that A+N be a legal address makes this usage of memory
nonportable.  On some systems, such as the VAX, a legal address is one
which falls on a page boundary, and so you must know the page size to
generate a suitable value of N.  On other systems, a legal address is
one which falls on a segment boundary, which may make this approach
impossible.  A hardware designer might decide to divide a 32 bit address
space into 64 segments, in which case each segment would have to be on
a 32 megabyte boundary.  I doubt if there are any UNIX systems which
will allow you to create a 32 megabyte segment.
				Kenneth Almquist
				ihnp4!houxm!hropus!ka	(official name)
				ihnp4!opus!ka		(shorter path)



More information about the Comp.unix.wizards mailing list