This is the mail archive of the
mailing list for the GCC 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: <email@example.com>
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 <firstname.lastname@example.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
> (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.