At 04:08 AM 6/8/2002, Andi Gutmans wrote:

I just checked and it seems like Apache APR memory pools use mutex locking.
It'd be better to use functions like the Win32 ones which don't use mutex locking (as we made sure that only one thread allocates from its pool). This could be achieved by compiling apr_pools.c without APR_HAS_THREADS but I bet the default Apache 2 build has this enabled.

It's still pretty much a non-issue. Although we've discussed thread-specific
allocators [that don't lock for allocation at all] win32 uses CriticalSections by
default, which adds 10 cpu instructions or so to obtain an uncontested mutex.


This probably would hurt Unix, so you might be interested in apr_pools
discussion of the apr_allocator approaches.  All these low-level discussions
are on APR, so I'm directing this discussion to that platform.

Nice to see another library leaning on APR [or at least, the Zend deployment
for PHP/Apache :-]

Bill





Reply via email to