httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject module memory allocation and threads
Date Sun, 22 Jun 2008 23:53:40 GMT
Hi List,

I'm have modified mod_vhost_alias.c to perform an md5 lookup in mva_translate.

This process takes some over head and I would like to use the  
apr_hash_t structure to hash already calculated MD5's and lookup the  
MD5 from the hash when mva_translate is called at a future time.

I'm new to the code so I'm not sure how the pool memory scopes work.  
Here are a few questions to try and clarify how to implement the  
proposed solution:

1. Is the apr_hash thread safe and does it have to be thread safe when  
used in mva_translate?

2. If using the hash is fesiable, how do I initalise it to be used in  
the module so it can be useful and destruct the object?

3. Is there a better way?

Thanks Dan Zoltak

View raw message