You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <ia...@apache.org> on 2002/08/01 01:10:34 UTC

mod_cache's hash table question

it seems to have a memory leak.

when you remove an entry from the hash table, there seems to be no 
method to free
the memory used by the key field, as there is no way to retrieve that 
pointer back from the
current api.

now we have 2 choices from what I can see.
* copy the key when we 'set' it initally and then we can safely free it.
* free it anyway.. I don't like this as the intial key might not have 
been malloc'd in the first place

the other problem with this is that it will make the cache_hash slightly 
different than the apr_hash
 (which also has the same problem, but thanks to pools is masked)

Any ideas/preferernces?