Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 79433 invoked by uid 500); 10 Sep 2001 18:45:50 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 79389 invoked from network); 10 Sep 2001 18:45:49 -0000 Message-ID: <3B9D0A08.4020203@xbc.nu> Date: Mon, 10 Sep 2001 20:44:24 +0200 From: Branko =?ISO-8859-2?Q?=C8ibej?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.3) Gecko/20010801 X-Accept-Language: sl, en-gb, en MIME-Version: 1.0 To: Luke Kenneth Casson Leighton CC: dcerpc-dev@lists.dcerpc.org, "'samba-technical@lists.samba.org'" , "'tng-technical@samba-tng.org'" , "'dev@apr.apache.org'" , dcom-dev@lists.dcerpc.net Subject: Re: Shared memory and IPC References: <95AE3CDB3543D511883A0020485B38B901252A7F@exna3.stratus.com> <20010910131608.H5579@angua.rince.de> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Luke Kenneth Casson Leighton wrote: >the implementation has, if you to are pass over data >structures between programs, presumably in exactly >the same way that those DB apps are doing, > I don't think DBMSs pass around pointers. > you must >preserve pointers / memory segment offsets. > >and that means using MMAP_FIXED. > >if anyone has any better ideas, love to hear them. > You're passing around structured defined in IDL, right? Therefore you know exactly where the pointers are. I assume pointers are the only bits that will cause problems if the segment isn't mapped to the same addresses in both apps. If all of the above is correct, and MMAP_FIXED fails (as it sometimes will) or isn't available (as it often isn't), you can simply fixup the pointers by adding an offset -- the difference between the addresses of the mapped area in the two apps. That would still be faster than a memcpy (except if you're passing arrays of poitners). -- Brane �ibej http://www.xbc.nu/brane/