Skip to Content.
Sympa Menu

freetds - Re: tds_process_login_tokens()

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: tds_process_login_tokens()
  • Date: Wed, 7 Aug 2002 14:04:45 +0200


>
> Freddy,
>
> I get 2038 bytes allocated and unfreed using
> gethostbyname_r() which is
> not as bad but still some leakage.
>
> I saw some noise on the glibc list about using endhostent()
> after calls to
> gethostbyname(), but doing so made the leakage worse.
> However, if this
> were a required call, one would assume that every example call to
> gethostbyname() program would include it, and none do.
>
> Brian
>
I think that we must live with this memory.
gethostbyname is not a simple function and require a lot of cache stuff
(parsing nsswitch.conf, loading required so libraries, cache connection,
hosts file) so only 3K (or 2K using gethostbyname_r) seem good.
Calling endhostent can slow name resolving...
IMHO the current code is fine.

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page