apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject Re: freelists: a slightly different approach
Date Wed, 26 Sep 2001 08:03:14 GMT
Justin Erenkrantz wrote:


>What's wrong with an internal hashtable here keyed off of the 
>thread id (or whatever is returned by apr_os_thread_current)?
>Internally, you can represent the apr_bucket_freelist* as you 
>describe (that sounds good) - so we can abstract all of that 
>away, but forcing this out to the caller seems like the wrong 
>direction to go.  The hashtable makes it so that it is of 
>indeterminate size and the retrieval speed should be fast 
>enough for our purposes.
>Or, what am I missing?  -- justin

How about just adding an apr_bucket_freelist* to the conn_rec
and requiring each MPM to set it appropriately?  Filters could
then reach the right free list via the ap_filter_t*, and  most
other callbacks could reach it through the request_rec*, without
having to look up and hash the current thread ID for every bucket


View raw message