🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #10037

Re: Standard for Shared Memory

#10037
From: chuck
Date: Tue, 03 Jan 1989 23:36
31 lines
1839 bytes
> Does a shared memory concept exist, not limited by hardware restrictions,
> portable to 'all' unix based systems?

Concepts are extremely portable.

The most available shared memory facility (discounting shared files of
course) is currently System V IPC shared memory: shmget(), shmat(),
shmctl().  These are implemented on most Berekely derived systems as
System V enhancements.  I know for sure that it is supported on such
systems as Sun, HP, Apollo, IBM (AIX), and Xenix.  However, most Berkeley
implementations do not yet include some of the more recent AT&T
enhancements such as shared memory segment locking, paging vs. non-paging
shared memory, etc...

My new favorite form of shared memory are memory mapped files (see
mmap()).  I am not sure how available memory mapped files are currently;
certainly less available than System V shared memory.  IBM's AIX does
provide equivalent functionality to mapped files by providing additional
options to the shmget() call.

My recommendation to anyone who wants to be as portable as possible is to
write a layer on top of the appropriate shared memory facility on your
machine.  When you get a new machine with different facilites, add some
more ifdefs to your shared memory layer source and the rest of your code
remains untouched.

Chuck Ocheret
Morgan Stanley & Co., Inc.
1251 Avenue of the Americas
New York, N.Y. 10020
(212)703-4474
Technical Details
Message-ID: <8812211326.AA00477@s2.Morgan.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rice!sun-spots-request
From: chuck@morgan.com
Newsgroups: comp.sys.sun
Subject: Re: Standard for Shared Memory
Message-ID: <8812211326.AA00477@s2.Morgan.COM>
Date: 3 Jan 89 23:36:20 GMT
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 31
Approved: Sun-Spots@rice.edu
Original-Date: Wed, 21 Dec 88 08:26:12 EST
X-Sun-Spots-Digest: Volume 7, Issue 86, message 3 of 12