Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
On Thu, Feb 07, 2008, Robert Collins wrote: > > On Thu, 2008-02-07 at 14:08 +0900, Adrian Chadd wrote: > > On Thu, Feb 07, 2008, Robert Collins wrote: > > > > > > Still, this is one of those "death of a thousand cuts" method of > > > > killing performance.. > > > > > > Right, I haven't seen the

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Robert Collins
On Thu, 2008-02-07 at 14:08 +0900, Adrian Chadd wrote: > On Thu, Feb 07, 2008, Robert Collins wrote: > > > > Still, this is one of those "death of a thousand cuts" method of > > > killing performance.. > > > > Right, I haven't seen the commit; care to mail the diff? > > Which? I just looked at

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
On Thu, Feb 07, 2008, Robert Collins wrote: > > Still, this is one of those "death of a thousand cuts" method of > > killing performance.. > > Right, I haven't seen the commit; care to mail the diff? Which? I just looked at the places where Amos is calling GetAddrInfo() and FreeAddrInfo(); more

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Robert Collins
On Thu, 2008-02-07 at 12:21 +0900, Adrian Chadd wrote: > > Well, I haven't removed the temporary malloc/free pair, whatever its > called; > I've just removed Amos' workaround in src/comm.cc so it doesn't leak > on my > system whilst I profile. > > Still, this is one of those "death of a thousand

Re: 20080207-squid3-nonzero-buffers.diff

2008-02-06 Thread Adrian Chadd
On Wed, Feb 06, 2008, Alex Rousskov wrote: > Ouch. I did not realize the two ended up in different classes. yeah, neither did I until I started toying with it. > doZeroOnPush has nothing to do with allocation and is not even used by > MemAllocator, but it has to be there and not in MemPool becau

Re: 20080207-squid3-nonzero-buffers.diff

2008-02-06 Thread Alex Rousskov
On Thu, 2008-02-07 at 09:13 +0900, Adrian Chadd wrote: > 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(). Ouch. I did not realize the two ended up in different

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
On Thu, Feb 07, 2008, Robert Collins wrote: > > > > I've removed that hack, and things work fine for me. Ubuntu 7.01 here, > > x86_64. > > There's a useful c++ thing called 'placement new' - its used when you > have classes that you want to use on the stack, but still have tight > abstraction bo

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Robert Collins
On Thu, 2008-02-07 at 11:56 +0900, Adrian Chadd wrote: > Argh, this temporary malloc/free pair is peppered throughout the codebase! > Grr. > > I've removed that hack, and things work fine for me. Ubuntu 7.01 here, x86_64. There's a useful c++ thing called 'placement new' - its used when you ha

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
On Thu, Feb 07, 2008, Amos Jeffries wrote: > > Amos, could you please poke the leak in IPAddress:GetAddrInfo a little? > > I'll give it another try. But don't hold your breath too long on that one. > > Did you see my note on it? > I tracked that leak backwards from two segfaults to the connect()

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
On Thu, Feb 07, 2008, Amos Jeffries wrote: > > Amos, could you please poke the leak in IPAddress:GetAddrInfo a little? > > I'll give it another try. But don't hold your breath too long on that one. Why are you trying to allocate the structure on invocation of GetAddrInfo() ? Wouldn't it be bette

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
On Thu, Feb 07, 2008, Amos Jeffries wrote: > > Amos, could you please poke the leak in IPAddress:GetAddrInfo a little? > > I'll give it another try. But don't hold your breath too long on that one. > > Did you see my note on it? > I tracked that leak backwards from two segfaults to the connect()

Re: 20080207-squid3-nonzero-buffers.diff

2008-02-06 Thread Amos Jeffries
> 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 accesso

Re: squid-3.HEAD IPAddress leak

2008-02-06 Thread Amos Jeffries
> Amos, could you please poke the leak in IPAddress:GetAddrInfo a little? I'll give it another try. But don't hold your breath too long on that one. Did you see my note on it? I tracked that leak backwards from two segfaults to the connect() system call. Then I tracked the allocation from my init

Re: Solaris privileges to use pinger w/o setuid-root

2008-02-06 Thread Amos Jeffries
> On Sat, Jan 26, 2008 at 01:16:14PM +1300, Amos Jeffries wrote: >> Frank Fegert wrote: >> >On Fri, Jan 25, 2008 at 09:25:24AM +1300, Amos Jeffries wrote: >> >>>i did a quick hack and patched Solaris privileges support into >> pinger.c >> >>>from squid-2.6.STABLE18. This should allow to run pinger

Re: URIs for accelerators

2008-02-06 Thread Mark Nottingham
Thanks, I'll try that out. I can see henrik's point; this *could* be solved by improving the documentation (and in any case, it needs it). However, I tend to like what I think this patch is going to do; it's the least surprising thing. Cheers, On 03/02/2008, at 6:55 AM, Adrian Chadd wrote

Re: 20080207-squid3-nonzero-buffers.diff

2008-02-06 Thread Adrian Chadd
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 po

squid-3.HEAD IPAddress leak

2008-02-06 Thread Adrian Chadd
Amos, could you please poke the leak in IPAddress:GetAddrInfo a little? Thanks, Adrian ==19601== ==19601== ERROR SUMMARY: 9353 errors from 5 contexts (suppressed: 8 from 2) ==19601== malloc/free: in use at exit: 36,429,514 bytes in 14,790 blocks. ==19601== malloc/free: 114,225 allocs, 99,435

Re: a simple formatter

2008-02-06 Thread Amos Jeffries
>> Hi all, >> >> I wrote a small perl script which fixes (some of) the astyle problems. >> >> Before use it, you must adjust the $ASTYLE_BIN variable at the beggining >> of the formatter.pl file. >> >> I am running it using the following command: >> # find . -name "*.cc" -exec formater.pl \{\} \

Re: a simple formatter

2008-02-06 Thread Amos Jeffries
> Hi all, > > I wrote a small perl script which fixes (some of) the astyle problems. > > Before use it, you must adjust the $ASTYLE_BIN variable at the beggining > of the formatter.pl file. > > I am running it using the following command: > # find . -name "*.cc" -exec formater.pl \{\} \; > but i

Re: Solaris privileges to use pinger w/o setuid-root

2008-02-06 Thread Frank Fegert
On Sat, Jan 26, 2008 at 01:16:14PM +1300, Amos Jeffries wrote: > Frank Fegert wrote: > >On Fri, Jan 25, 2008 at 09:25:24AM +1300, Amos Jeffries wrote: > >>>i did a quick hack and patched Solaris privileges support into pinger.c > >>>from squid-2.6.STABLE18. This should allow to run pinger w/o setui

a simple formatter

2008-02-06 Thread Tsantilas Christos
Hi all, I wrote a small perl script which fixes (some of) the astyle problems. Before use it, you must adjust the $ASTYLE_BIN variable at the beggining of the formatter.pl file. I am running it using the following command: # find . -name "*.cc" -exec formater.pl \{\} \; but it can take multip

20080207-squid3-nonzero-buffers.diff

2008-02-06 Thread Alex Rousskov
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