Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 9273 invoked from network); 20 Jun 2007 11:38:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2007 11:38:29 -0000 Received: (qmail 82856 invoked by uid 500); 20 Jun 2007 11:38:32 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 82814 invoked by uid 500); 20 Jun 2007 11:38:31 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 82799 invoked by uid 99); 20 Jun 2007 11:38:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2007 04:38:31 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jun 2007 04:38:27 -0700 Received: (qmail 9213 invoked from network); 20 Jun 2007 11:38:07 -0000 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 20 Jun 2007 11:38:07 -0000 Message-ID: <4679119E.30509@apache.org> Date: Wed, 20 Jun 2007 07:38:06 -0400 From: "William A. Rowe, Jr." User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Peter Samuelson CC: Manfred Rebentisch , dev@apr.apache.org Subject: Re: SHM / RMM pointer values References: <200706150923.58591.mrebentisch@comparat.de> <20070620042048.GA31225@p12n.org> In-Reply-To: <20070620042048.GA31225@p12n.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Exactly. Good call Peter. The bottom line - shim pointers need to be apr_size_t indexes into the defined SHM segment. Peter Samuelson wrote: > [Manfred Rebentisch] >> struct mystr { >> struct mystr* next; >> char* data; >> size_t dsize; >> }; > > I'm pretty sure you can't portably implement shared memory mapped to a > fixed base address in all processes. Thus pointers simply _cannot_ be > shared as pointers, you need to make them size_t values relative to the > shm segment base address, or something. > > On many systems you can _request_ that a shm segment be mapped to a > particular address, but the OS may or may not be able (and willing) to > honor that. And on other systems you can't even do that. So apr > doesn't support that feature.