Re: squid-3.HEAD IPAddress leak

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 7 Feb 2008 14:19:41 +0900

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 commit; care to mail the diff?
> >
> > Which? I just looked at the places where Amos is calling GetAddrInfo()
> > and FreeAddrInfo(); more then one are:
> >
> > * GetAddrInfo(temp, );
> > * F->{something} = temp;
> > * FreeAddrInfo(temp);
>
> Wheee, surely that would be better as
> F->{something} = GetAddrInfo(...)

or just GetAddrInfo(F->something, ...)

We're just filling in the details, there's no need to throw 50-60 bytes on
the stack and copy it when a pointer/reference will suffice.

Adrian

-- 
- 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 - 22:07:51 MST

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