This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Final intermodule patch
Geoffrey Keating wrote:-
> On Friday, July 11, 2003, at 03:18 PM, Neil Booth wrote:
>
> >Geoffrey Keating wrote:-
> >
> >> * cpplib.c (undefine_macros): New.
> >> (cpp_undef_all): New.
> >
> >This is problematic as memory is never freed.
>
> Could you clarify that? undefine_macros does exactly as much freeing
> as do_undef does---admittedly, I think that's none at all, but I don't
> think that's ever been a problem for do_undef.
>
> Actual memory usage is completely dominated by other things, of course,
> like the identifier hash table and trees and such.
Nothing is really freed. This is less than ideal with #undef at
present; but when doing multiple files it can start to balloon. A
normal GCC file creates over 1 Meg of macro expansions.
Since it only affects users of this feature (I think?) I'm not too
bothered by it, but it should be borne in mind if / when we discuss
memory bloat.
Neil.