Re: Squid-2.6 + zeroing buffers

From: Guido Serassio <guido.serassio@dont-contact.us>
Date: Sun, 24 Sep 2006 19:18:32 +0200

Hi Adrian,

At 09.20 24/09/2006, Adrian Chadd wrote:
>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.

Just a portability question:
bzero() is deprecated and is not available on all platforms, memset()
should be used instead.

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Sun Sep 24 2006 - 11:18:53 MDT

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