Re: 20080207-squid3-nonzero-buffers.diff

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 7 Feb 2008 09:13:23 +0900

Updated patch:

http://www.creative.net.au/diffs/20080207-squid3-nonzero-buffers-2.diff

doZeroOnPush can't be private as it then seems to be inaccessible from
MemPool::push().

Adrian

On Wed, Feb 06, 2008, Alex Rousskov wrote:
> Adrian,
>
> A few comments regarding the nonzero patch you posted on IRC:
> http://www.creative.net.au/diffs/20080207-squid3-nonzero-buffers.diff
>
> First of all, it is a move in the right direction, of course. If you
> verified that it works, it can be committed as is. Here are a few
> nitpicks since you asked for comments:
>
> - Replace "dontZeroMe()" with "zeroOnPush(bool doIt)" because negative
> names are confusing and because we are not zeroing the object ("this" or
> "me"), but the memory we push into it.
>
> - Remove virtual from dontZeroMe(). Makes folks look hard for
> extensions, etc.
>
> - Make zeroBuffer private. Alternatively, make it public and remove the
> set method. Protected data members cause weird C++ problems,
> unfortunately.
>
> - Rename zeroBuffer to doZeroOnPush so that the association with the set
> method is clear and the purpose is more precise.
>
> - Remove memDataNonZero() if possible. It do nothing new and we need
> fewer globals.
>
> - Consider adding boolean aZeroOnPush parameter to memDataInit(), with
> false as the default value.
>
> Thank you,
>
> Alex.
>

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
Received on Wed Feb 06 2008 - 17:01:34 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST