Re: Finding mem leaks with mtrace() on glibc-based systems
- From: Ulrich Drepper <drepper redhat com>
- To: Nate Case <nd kracked com>
- Cc: gnome-hackers gnome org, Ole Aamot <oka ping uio no>
- Subject: Re: Finding mem leaks with mtrace() on glibc-based systems
- Date: 22 Mar 2001 13:18:45 -0800
Nate Case <nd kracked com> writes:
> Is there any reason not to use these techniques? I was waiting for
> someone else to step in and say "this is great", or "this isn't the
> correct approach", but to no avail. Anyone have strong opinions on
> this matter?
All I can say is that I use it all the time, even for debugging things
like ld.so. But of course you can call me biased.
IMO every program should start with
int
main (int argc, char *argv[])
{
...local vars...
#ifndef NO_DEBUGGING
mtrace ();
#endif
}
The mtrace() call doesn't do anything by itself, you have to set the
appropriate environment variable at runtime. glibc itself should not
contain any leaks and therefore anything which is reported is a
problem in the application.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]