20080207-squid3-nonzero-buffers.diff

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Wed, 06 Feb 2008 11:23:45 -0700

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.
Received on Wed Feb 06 2008 - 11:23:56 MST

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