Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!caen!ox.com!tbomb.ice.com!time From: time@tbomb.ice.com (Tim Endres) Newsgroups: comp.sys.mac.programmer Subject: Re: Shared memory Message-ID: <1CE00001.6q9i4t@tbomb.ice.com> Date: 25 Nov 90 15:32:33 GMT Reply-To: time@tbomb.ice.com Organization: ICE Engineering, Inc. Lines: 28 X-Mailer: uAccess - Mac Release: 1.0.2 In article <3171@cernvax.cern.ch>, marty@cernvax.cern.ch (hugues marty) writes: > Is there a way of having shared memory? I don't want to use a driver. > I thought of allocating a non-relocatable block in the system heap > (yes, the system heap) and pass the address via a file. Is it a good > way? > This is perfectly valid depending on your case. First, the file mechanism leaves a lot to be desired in terms of checking for validity etc, but will work. Second, you need to determine your memory requirements. If they are very small ( < 2048 ) then you can usually the system heap space from within an application, but if the requirements are large (> 4K), then you will need some type of INIT to get the space at boot time. Third, if you wind up needing an INIT, you may as well write a driver! Finally, sample driver code to do all of this is available. tim. ------------------------------------------------------------- Tim Endres | time@ice.com ICE Engineering | uunet!ice.com!time 8840 Main Street | Whitmore Lake MI. 48189 | (313) 449 8288