httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: [Request for commnets] why mod_ldap uses calloc & free instead of creating subpool for cache management???
Date Mon, 12 Jul 2004 12:32:11 GMT
Sadaf Alvi wrote:

> i saw util_ldap_cache to know from which pool it is allocating cache
> memory. i wonder to know that it is using util_ldap_cache_mgr which in
> turn using calloc & free internally.
> why it is not using pconf pool  to allocate cache memory?? is there
> any memory or performance issue ??

This has come up on this list before.

The memory pools allow you to allocate memory, but not free memory - you 
can only free an entire pool. This could cause problems for a cache 
which grows in size, you cannot free entries without freeing an entire 
block of entries.

It's on my list of things to look at as to whether using pools might 
make things more robust, but using pools is definitely not as simple to 
apply as using calloc/free, which works for now.


View raw message