Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 24314 invoked by uid 6000); 21 Dec 1997 05:09:43 -0000 Received: (qmail 24307 invoked from network); 21 Dec 1997 05:09:40 -0000 Received: from unknown (HELO xyzzy.machaon.ru) (195.218.138.72) by taz.hyperreal.org with SMTP; 21 Dec 1997 05:09:40 -0000 Received: from localhost (localhost.rbc.ru [127.0.0.1]) by xyzzy.machaon.ru (8.8.8/8.8.5) with ESMTP id IAA03307; Sun, 21 Dec 1997 08:09:27 +0300 (MSK) Message-Id: <199712210509.IAA03307@xyzzy.machaon.ru> X-Mailer: exmh version 2.0zeta 7/24/97 To: new-httpd@apache.org Cc: Dean Gaudet , dima@bog.msu.su Subject: Re: calling pstrdup() on value before table_set? In-reply-to: Your message of "Sat, 20 Dec 1997 19:10:05 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 21 Dec 1997 08:09:21 +0300 From: Dmitry Khrustalev Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org > Oh interesting... I wasn't aware that table_set() duplicated the value > behind the scenes as well. Damn, these should all be cleaned up then. Even worse, table_(set|merge|add) also duplicate keys. > > Either that or the table_*() functions should be changed to not > duplicate... I wonder which wastes less memory. Not duplicating is likely > to be a source of bugs though, because you have to allocate into the right > pool. I'm running apache with non-duplicating table api since september with no ill effects. ( using parallel non-duplicating table_(setn|mergen|addn) and copying value argument where appropriate). Performance improvement is quite measurable. -Dima > > Dean > > On Sat, 20 Dec 1997, Marc Slemko wrote: > > > There are a number of cases in the code where something like: > > > > table_set(new->subprocess_env, "REDIRECT_STATUS", pstrdup(r->pool, t)); > > > > happens. There is no reason for the pstrdup() except to waste memory is > > there? > > > >