This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Memory leak in a shared library plugin
- From: Ian Lance Taylor <iant at google dot com>
- To: "Cason\, Kenny" <kenny dot cason at boeing dot com>
- Cc: "gcc-help\ at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, "Hodges\, Tara N" <tara dot n dot hodges at boeing dot com>
- Date: Wed, 30 Sep 2009 00:05:26 -0700
- Subject: Re: Memory leak in a shared library plugin
- References: <4717B331DCA29F47AC01282C7D7DA4B196077428@XCH-NW-03V.nw.nos.boeing.com>
"Cason, Kenny" <kenny.cason@boeing.com> writes:
> 3) does not run from the command line so use of gdb and breakpoints is of little value
See gdb's attach command.
> Determine why the memory continuously increases (memory leak?) for
> Daemon A. If it's a memory leak is it in Daemon A or Plugin B.
Tough problem. I think I would modify the heap allocation and free
routines in the plugin to log a message. Then with some scripting you
could perhaps see if all allocated memory was freed during a typical
plugin call.
Ian