httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <>
Subject Re: util_ldap [Bug 29217] - Remove references to calloc() and free()
Date Thu, 10 Jun 2004 00:05:04 GMT
   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 Nicholes
Senior Software Engineer
Novell, Inc., the leading provider of Net business solutions 

>>> 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
> that the system has no way of reclaiming outside of restarting the
> server.  NetWare doesn't have the concept of a child config pool
> there are no child processes and therefore no need to use shared
>  Simply restarting a child process is not an option.  On NetWare it
> all or nothing.  Apache is either up and running or not.  If you
> to shutdown the process to reclaim memory, you lose the web server.


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
a new pool, and trash the old pool).


View raw message