> 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(). >
Try setting up a friend' relationship between MemPool and MemAllocator classes. Or creating an inline accessor. Amos > > > 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 - >