Hi,

As Greg pointed out, I should have posted the code here sooner
for review instead of mailing it to others in private first.
I wanted to have the obvious bugs out before I posted though.
And, I wanted to know if it would actually perform instead of
being a lot of hot air.

Anyway, attached are a replacement apr_pools.h and apr_pools.c
(yes, attached, because I use outlook...).  I would like to
provide incremental patches as Greg suggested, but it is already
midnight again and I am tired.

Justin will probably follow up later with test results.

Disclaimer and changes:  

 - The allocation scheme (therefor apr_pool_t and friends,
   apr_palloc, apr_pcalloc, apr_pool_create *), apr_pool_clear,
   apr_pool_destroy and apr_pvsprintf (and its flush function).

   *) apr_pool_create is now a macro that calls apr_pool_create_ex
      with default arguments.

 - In addition, the way we keep track of free blocks is changed
   for faster allocations.

 - There is a way to ask for a new freelist for a pool instead
   of using its parents freelist, at creation time.

 - The code lacks good comments (I'll work on that, but not
   now).

 - There is still stuff in the original apr_pools.c that needs
   merging over (and maybe some rethought).  AFAIK that is all
   debug related, the server runs well without it.

 - The includes need cleaning up. I simply copied the original
   includes and that seems a bit too much.  IIRC it doesn't
   use APR_WANTxxx either.

 - The apr_pools.h file has some simple mods.  Instead it should
   be cleaned up.


Sander

Attachment: apr_pools.c
Description: Binary data

Attachment: apr_pools.h
Description: Binary data

Attachment: httpd.patch
Description: Binary data

Reply via email to