Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F9EF9059 for ; Mon, 28 Nov 2011 21:53:02 +0000 (UTC) Received: (qmail 53336 invoked by uid 500); 28 Nov 2011 21:53:01 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 53263 invoked by uid 500); 28 Nov 2011 21:53:00 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 53255 invoked by uid 99); 28 Nov 2011 21:53:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 21:53:00 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ignazb@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bw0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 21:52:53 +0000 Received: by bkbzu5 with SMTP id zu5so11028940bkb.18 for ; Mon, 28 Nov 2011 13:52:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=YhMuHtFCiE5AgYUuxZpoVtfHm+R813bX1FMz/CHX3QQ=; b=wIJxOR1k2Wl0RkBpEW2Rl60nNkjMnfqFMjSny8b2t9WnxyB7hcZidgR+BOAn1sVJMM 6FvIU2tXhcGbuTTOSsxrguPDvdqRGXOJ4RT2T1OBxnsQxaU7HBG45qUxN4Ka/dlZvCt6 Yb2RUHqRDHWxSonT23rAEvtpzNB7Yu9S9c698= Received: by 10.204.41.66 with SMTP id n2mr47851966bke.77.1322517151565; Mon, 28 Nov 2011 13:52:31 -0800 (PST) Received: from lhc (cm200-75.liwest.at. [81.10.200.75]) by mx.google.com with ESMTPS id z7sm32564986bka.1.2011.11.28.13.52.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 13:52:30 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: modules-dev@httpd.apache.org Subject: Re: Binary Tree Shared Memory Problem References: Date: Mon, 28 Nov 2011 22:52:23 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ignaz Birnstingl" Message-ID: In-Reply-To: User-Agent: Opera Mail/11.52 (Win32) Hi, apr_shm_baseaddr_get returns the base address for the shared memory segment. You will have to implement your own "allocator" within the shared memory. Also keep in mind that you can't reliably use pointers inside the shared memory segment, because - as the documentation states - the address returned by apr_shm_baseaddr_get "is only usable within the callers address space, since this API does not guarantee that other attaching processes will maintain the same address mapping." Inter- and intra-process synchronization will be problems you will encounter later on. Btw Apache 2.3 offers mod_slotmem which helps in using shared memory - maybe you should have a look at it? -- Ignaz