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 <[EMAIL PROTECTED]> 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
--

Reply via email to