Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 61143 invoked from network); 10 Jun 2004 00:05:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Jun 2004 00:05:35 -0000 Received: (qmail 99449 invoked by uid 500); 10 Jun 2004 00:05:45 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 99388 invoked by uid 500); 10 Jun 2004 00:05:44 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 99363 invoked by uid 99); 10 Jun 2004 00:05:44 -0000 Received: from [137.65.81.169] (HELO sinclair.provo.novell.com) (137.65.81.169) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 09 Jun 2004 17:05:44 -0700 Received: from INET-PRV-MTA by sinclair.provo.novell.com with Novell_GroupWise; Wed, 09 Jun 2004 18:05:15 -0600 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Beta Date: Wed, 09 Jun 2004 18:05:04 -0600 From: "Brad Nicholes" To: Cc: , Subject: Re: util_ldap [Bug 29217] - Remove references to calloc() and free() Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I guess that is a possibility but I still don't understand what the problem is with using calloc() and free() for the ldap caching code. This seems to be a common thing to do when global memory needs to be allocated and deallocated constantly. To avoid having the memory grow uncontrolably, you have to be able to control it at a much finer level than apr_pool allows you. Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com >>> Graham Leggett Wednesday, June 09, 2004 5:51:47 PM >>> Brad Nicholes wrote: > But if you are allocating memory for cache entries that are > constantly expiring and being purged, the pool will continue to grow > until the server is restarted. The pool would end up with stale memory > that the system has no way of reclaiming outside of restarting the > server. NetWare doesn't have the concept of a child config pool since > there are no child processes and therefore no need to use shared memory. > Simply restarting a child process is not an option. On NetWare it is > all or nothing. Apache is either up and running or not. If you tried > to shutdown the process to reclaim memory, you lose the web server. Hmmm... Could apr_reslist_* help here? Perhaps if the memory was allocated from a pool which was cleaned up periodically using apr_reslist_* (where "cleaned up" could mean duplicate all fresh cache entries in the pool to a new pool, and trash the old pool). Regards, Graham --