From owner-freebsd-arch@FreeBSD.ORG Sun May 10 06:25:28 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66F291065675 for ; Sun, 10 May 2009 06:25:28 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from dd17920.kasserver.com (dd17920.kasserver.com [85.13.138.236]) by mx1.freebsd.org (Postfix) with ESMTP id 284FE8FC1B for ; Sun, 10 May 2009 06:25:28 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from X64SSD (unknown [117.47.148.131]) by dd17920.kasserver.com (Postfix) with ESMTP id 50215181B39BE; Sun, 10 May 2009 08:00:19 +0200 (CEST) Date: Sun, 10 May 2009 07:57:06 +0200 From: Lothar Scholz X-Mailer: The Bat! (v3.62.08) Professional Organization: Scriptolutions X-Priority: 3 (Normal) Message-ID: <7710650619.20090510075706@scriptolutions.com> To: Garrett Wollman In-Reply-To: <200905100500.n4A50GOa050728@hergotha.csail.mit.edu> References: <200905100500.n4A50GOa050728@hergotha.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re[4]: Posix shared memory problem X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lothar Scholz List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 May 2009 06:25:28 -0000 Hello Garrett, Sunday, May 10, 2009, 7:00:16 AM, you wrote: GW> In GW> GW> scholz@scriptolutions.com writes: >>JT> shm_open/shm_unlink refer to the filesystem; they are fairly direct >>JT> wrappers around open and unlink. >> >>Question is where are they stored? GW> In the fileststem, in the path that you specify. They are just GW> ordinary files. GW> There was some thought that this was a bad (or at least GW> not-like-Linux) way of implementing this feature, so I believe GW> more-recent versions of FreeBSD do it differently. When I wrote this GW> code, I could not see any reason for the "path" argument to be GW> interpreted differently from any other path. Oh thats a very very bad idea. First of all you can't use '/' if you want stay portable. It is also just a maximum of 13 char long (says the FreeBSD 6.X man page) and usually you now pass names like "com.mycompany.myproduct.mypurpose" as names to prevent namespace collisons. The path has nothing to do with the filesystem, it's a separate namespace. Let alone that semaphores and shared memory already use the same namespace is something i didn't expect on Linux. Now it is clear where my problem is and i go to a mmap to a $HOME/. file. Not nice but if anybody gives a shit about compatibility (backward and to other systems before implementing stuff) it is the only way. -- Best regards, Lothar Scholz mailto:scholz@scriptolutions.com