Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helps!bigtex!natinst!davoli From: davoli@natinst.com (Russell Davoli) Newsgroups: comp.sys.mac.programmer Subject: Re: Shared addresses between applications with system 7 Message-ID: <24741@natinst.natinst.com> Date: 20 Jun 91 18:09:11 GMT References: <677390460.2@blkcat.FidoNet> Organization: National Instruments, Austin, TX Lines: 28 In article <677390460.2@blkcat.FidoNet>, Edward.Rice@p4214.f421.n109.z1.FidoNet.Org (Edward Rice) writes: > Re: > the better part of valor might be to allocate in the System heap > which is never subject to swapping... > > Allocate AND LOCK in the system heap, yes. > > * Origin: "It's still in beta testing," Tom said Pointedly. (1:109/421.4214) I assume you meant allocate and HLock, or simply allocate with NewPtr. According to the documentation, all of the system heap is locked in memory, which means that it can't be swapped or even moved around in physical memory. Seems to me that simply allocating in the application heap of one of the applications would work, too, as long as a HoldMemory call is made before passing the virtual address to the other application. The way I understand Apple's virtual memory system, applications don't have independent virtual address spaces and wind up using partitions of the virtual address space. The application that receives the pointer should be able to look into the other's address space. I don't claim to be an expert on Apple's implementation, so please correct me if I'm wrong. -------------------------------------------------------------------------- Russell Davoli (davoli@natinst.com) Software Eng. National Instruments Corp.