This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gcj] Some memory leak cleanups
- From: Andrew Haley <aph at redhat dot com>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 9 Jan 2005 10:26:24 +0000
- Subject: Re: [gcj] Some memory leak cleanups
- References: <1105219626.27293.6.camel@localhost.localdomain>
Mark Wielaard writes:
>
> While investigating bug #19325 by using valgrind I found some simple
> memory leaks. This patch fixes those:
>
> 2005-01-08 Mark Wielaard <mark@klomp.org>
>
> * parse.y (process_imports): Allocate (and free) original_name only
> when not already defined.
> * jcf-parse.c (read_class): Free results of find_class() and
> lrealpath().
> (java_parse_file): Keep pointer to head of file_list and free when
> done. Free result of lrealpath().
>
> It certainly doesn't solve the above bug. But when running gcj on a
> couple of hunderd (or thousand in the case of GNU Classpath) source
> files it certainly has an impact on the memory usage.
>
> OK to commit?
Good stuff, thanks.
Andrew.