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

Reply via email to