[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gethosybyname & gethostbyname_r
From: |
Ulrich Drepper |
Subject: |
Re: gethosybyname & gethostbyname_r |
Date: |
19 Jan 2001 08:48:39 -0800 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Capitol Reef) |
Phillip Partridge <address@hidden> writes:
> That piece of code is just a small snippet where I believe the leak to
> orginate from. If I link in any one of the free memory leak tools
> (dmalloc, debauch, mpatrol) then when the code exits I get a log file
> stating that 6324 bytes were not freed.
This does not mean anything. These tools simply don't do the
necessary things. Plus, your program is not freeing the resources
itself.
> Its not that much of a leak, I know. I was just curious as to why it was
> happening and things.
There is no leak with the services I'm using (only nss_files). If you
would understand only a tiny little bit of the issue and would read a
bit in the manual you would write
#include <mcheck.h>
int main(int argc, char **argv)
{
struct hostent *h;
mtrace();
h = gethostent("host name in here");
endhostent();
return(0);
}
$ MALLOC_TRACE=OUT ./program
$ mtrace program OUT
and you would see what really happens. And note the endhostent() call
I had to insert to correct your mistakes.
> Why are people in this list so agressive.
The only one who is agressive is you. You come in, don't even
understand the problem, and call people stupid.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
- Re: gethosybyname & gethostbyname_r, Andreas Jaeger, 2001/01/18
- Re: gethosybyname & gethostbyname_r, Phillip Partridge, 2001/01/19
- Re: gethosybyname & gethostbyname_r, Andreas Jaeger, 2001/01/19
- Re: gethosybyname & gethostbyname_r, Phillip Partridge, 2001/01/19
- Re: gethosybyname & gethostbyname_r, Andreas Jaeger, 2001/01/19
- Re: gethosybyname & gethostbyname_r, Phillip Partridge, 2001/01/19
- Re: gethosybyname & gethostbyname_r, Ulrich Drepper, 2001/01/19
- Re: gethosybyname & gethostbyname_r, Phillip Partridge, 2001/01/19
- Re: gethosybyname & gethostbyname_r,
Ulrich Drepper <=
- Re: gethosybyname & gethostbyname_r, Phillip Partridge, 2001/01/19