>
> 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(...)
>

F-something should all be IPAddress type. Assignment to update based on
some results kernel places in temp. That usage above is a guaranteed leak
of N bytes where N can be up to the size of a small DNS zone!

Please read this for a short synopsis of the requirements of addrinfo usage:
  http://linux.die.net/man/3/getaddrinfo

Amos

Reply via email to