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.


Reply via email to