This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12850] memory consumption for heavy template instantiations tripled since 3.3


------- 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" <gcc-bugzilla@gcc.gnu.org> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]