------- Additional Comments From gdr at integrable-solutions dot net 2004-12-23 14:42 ------- Subject: Re: memory consumption for heavy template instantiations tripled since 3.3
"steven at gcc dot gnu dot org" <[EMAIL PROTECTED]> writes: [...] | Maybe buffer should not be in GC memory at all? We know the | exact live time of buffer, and as far as I can tell we never | ggc_collect while it is live. According to the comments for | cp_lexer, "Tokens are never added to the cp_lexer after it is | created." So it may be cheaper to have the buffer xmalloced, | and memcpy-ed to a buffer in GC space just before saving it | in the new cp_lexer object. Your analysis makes sense to me. I never quite understood the addiction to GC-allocated memory throughout the compiler. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12850