Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!clyde!cbosgd!gwspc!cbcsta!n8emr!lwv
From: lwv@n8emr.UUCP (Larry W. Virden)
Newsgroups: comp.unix.wizards
Subject: Re: Motorola shared memory questions
Message-ID: <368@n8emr.UUCP>
Date: Sat, 5-Dec-87 09:52:14 EST
Article-I.D.: n8emr.368
Posted: Sat Dec  5 09:52:14 1987
Date-Received: Thu, 10-Dec-87 20:28:54 EST
References: <106600017@datacube> <106600019@datacube> <2581@cci632.UUCP>
Reply-To: lwv@n8emr.UUCP (Larry W. Virden)
Organization: N8EMR's Ham BBS (HBBS), Columbus,Ohio
Lines: 32


One warning!  Shared memory , even accessed via SVID compatible routines, 
are not all equal!  So for a truely compatible product, one needs to write
quite a sophisticated set of routines to call OVERTOP of shared memory, then
let them have different #ifdefs or modules for the different o/s.

Here are just TWO of the differences:

1. Under one well known and widely used CPU architecture, one is limited to
either 32k or 64k shared memory segments per call.  I forget which it is
right now... sorry!

2. Under another well known system, the vendor requires shared memory to 
be within one's program-breakpoint.  That is, you have to do a malloc() of
the appropriate size and then map the appropriately aligned address into
the shared memory environment.  Note that this is a NICE feature in one
sense, since you end up with a less restrictive environment interacting wih
stdio, other routines, etc. - as long as EVERYONE uses malloc and not
brk directly.

Since the internal implementation is not described within the SVID description,
vendors are free to implement it in many different ways.  For instance,
I have always wondered why shared memory wasnt implemented OUTSIDE of the
maximum breakpoint value; that would be another way to guarantee that
the program's use of malloc/etc would never interfere.


-- 
Larry W. Virden	 75046,606 (CIS)
674 Falls Place, Reynoldsburg, OH 43068 (614) 864-8817
cbosgd!n8emr!lwv (UUCP) 	cbosgd!n8emr!lwv@ucbvax.Berkeley.EDU (BITNET)
We haven't inherited the world from our parents, but borrowed it from our children.