[gcj] Some memory leak cleanups

Andrew Haley aph@redhat.com
Sun Jan 9 10:27:00 GMT 2005


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.



More information about the Gcc-patches mailing list