On Sun, Jul 08, 2001 at 10:34:22AM -0700, Jon Travis wrote: > There is still all this tomfoolery with locking, though, which I think > would be nice to fix with different sized buckets in the freelist. > Stuff that the malloc in glibc does. I cringe at the thought of how > much overhead due to abstraction this whole project is causing.
Well, most of the tomfoolery goes away when the free-list is per thread. No need for locking then. I think that this gets us better performance in a threaded environment than the current apr_pools.c - which has a per-process global list. The key is the allocation algorithm needs to take that into account (at this point, trivial isn't). In order to truly support a threaded environment, the free-lists need to become per-thread. With this abstraction, that *is* much easier. We're not there yet, but we're laying the groundwork to do so. -- justin