Squid-2.6 + zeroing buffers

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sun, 24 Sep 2006 15:20:06 +0800

Hiya,

Something thats been on the radar for a while but noone's actually done is
to modify the memory allocator to return non-zero'ed buffers where appropriate.

I've written a patch which adds a couple of calls to the memory allocator
and mempool allocator in squid-2.6 which doesn't zero the string and
mem_node buffers. There are possibly a few other buffers which could do with
not being zero'ed (eg the 1k/2k/4k/8k general-use buffers, the aio data
buffers, etc.)

http://www.creative.net.au/diffs/20060922-squid26-nozerobufs.txt

This obviously can't be extended to too many allocations as a lot of the code
assumes pre-zero'ed data for things like structure initialisation, etc.

I'd like some feedback - both on how I've written it and whether it gives
any noticeable performance differences in real-world workloads.

I'm aiming to put something similar into Squid-3.

Adrian
Received on Sun Sep 24 2006 - 01:19:41 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:06 MDT