C++ PATCH to conserve a bit more memory
Mark Mitchell
mark@codesourcery.com
Sun Oct 31 17:47:00 GMT 1999
This patch is not just an optimization; it also prevents us from
accessing GC'd memory later. (Revealed by enabling GGC_POISION in the
collector and running the tests.)
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.490
diff -c -p -r1.490 decl.c
*** decl.c 1999/10/30 23:32:54 1.490
--- decl.c 1999/11/01 01:44:28
*************** finish_function (lineno, flags)
*** 13782,13787 ****
--- 13782,13789 ----
}
else
{
+ /* Clear out memory we no longer need. */
+ free_after_parsing (current_function);
/* Since we never call rest_of_compilation, we never clear
CURRENT_FUNCTION. Do so explicitly. */
free_after_compilation (current_function);
More information about the Gcc-patches
mailing list