Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 64466 invoked from network); 19 Apr 2006 12:44:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 12:44:22 -0000 Received: (qmail 75646 invoked by uid 500); 19 Apr 2006 12:43:47 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 75600 invoked by uid 500); 19 Apr 2006 12:43:46 -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 75589 invoked by uid 99); 19 Apr 2006 12:43:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 05:43:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [193.252.22.54] (HELO smtp13.wanadoo.fr) (193.252.22.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 05:43:45 -0700 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1307.wanadoo.fr (SMTP Server) with ESMTP id 0CB4D70000B5 for ; Wed, 19 Apr 2006 14:43:20 +0200 (CEST) Received: from binarysecfb111 (AStDenis-105-1-14-168.w81-248.abo.wanadoo.fr [81.248.211.168]) by mwinf1307.wanadoo.fr (SMTP Server) with SMTP id 398F270000AB; Wed, 19 Apr 2006 14:43:17 +0200 (CEST) X-ME-UUID: 20060419124318235.398F270000AB@mwinf1307.wanadoo.fr Message-ID: <002e01c663ae$949b68b0$6700a8c0@binarysecfb111> From: "Michael Vergoz" To: "Joe Orton" , "Tyler MacDonald" Cc: References: <20060418203953.GW25538@yi.org> <20060419104138.GB15852@redhat.com> Subject: Re: Shared memory segment management Date: Wed, 19 Apr 2006 14:41:27 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, > IIRC the logic for choice of name-based shm implementation for APR does > exactly match that of MM - is that not true? I don't know why shmget is > preferred over mmap in this case. For anonymous shm, mmap/MAP_ANON is > indeed preferred over shmget, which does seem inconsistent. For me an MAP_SHARED used with MAP_ANON isn't correct because an SHM should be used to sync a file and a memory. Perhaps i am wrong.. But it isn't recommended to use MAP_FIXED (i.e: manpage) in general. How can process A know the SHM start address of process B ? with a pipe ? that is dirty. The sys ipc implementation is also not correct and there is something you can't do like remapping. I have made a small implementation of a new SHM design : http://www.badcode.be/~descript/.apache/ FEATURES: - "pager" allows you to specify a multiple of pages that may be used. It reduces reallocation so it reduces kernel call. - Memory auto alignement - File map auto padding - Auto remove on bad header - Auto create if file doesn't exist - Remap/reallocation possibility. - Auto padding (mem/file) when reallocating. - Kernel lock/unlock. - Memory bridge capatibility. - 2 lock types. This implementation was stoped because Apache folks have not been interested by this code (this is probably because the code isn't "apr ready") -mv