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 C3EDF66E7 for ; Mon, 20 Jun 2011 21:02:25 +0000 (UTC) Received: (qmail 98799 invoked by uid 500); 20 Jun 2011 21:02:25 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 98775 invoked by uid 500); 20 Jun 2011 21:02:25 -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 98767 invoked by uid 99); 20 Jun 2011 21:02:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 21:02:25 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of info@bnoordhuis.nl designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gx0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 21:02:16 +0000 Received: by gxk26 with SMTP id 26so911829gxk.18 for ; Mon, 20 Jun 2011 14:01:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.157.97 with SMTP id n61mr4500782yhk.285.1308603715324; Mon, 20 Jun 2011 14:01:55 -0700 (PDT) Received: by 10.236.105.144 with HTTP; Mon, 20 Jun 2011 14:01:55 -0700 (PDT) X-Originating-IP: [87.214.96.125] In-Reply-To: References: <4330EAB7-1E2D-44C8-B8B6-9312843B03FC@inmon.com> Date: Mon, 20 Jun 2011 23:01:55 +0200 Message-ID: Subject: Re: Module External Configuration From: Ben Noordhuis To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jun 20, 2011 at 22:46, Jason Funk wrote: > I have moved my configuration over to shared memory (following > mod_shm_counter as an example) and it conceptually seems to be working. I am > storing a struct in the memory and members that share it's memory (such as > the last mod time of the configuration file) persist over multiple children. > However, when I am loading the configuration file I have to allocate > additional memory. This apparently doesn't get stored in the same shared > memory as it isn't sticking around. How do I dynamically allocate new memory > to the struct that lives in shared memory? You cannot (portably), you'll have to reserve the extra space when you the allocate the shared memory.