How to use the garbage collector?

Mark Mitchell mark@codesourcery.com
Tue Jan 2 10:21:00 GMT 2001


>>>>> "Peter" == Peter Gerwinski <peter@gerwinski.de> writes:

    Peter> Hello,

    Peter> while integrating GNU Pascal into gcc-2.97, I reached the
    Peter> point where the compiler abort()s due to lang_mark_tree()
    Peter> in ggc-callbacks.c.

    Peter> What is the correct way to switch from obstacks to the GC
    Peter> in the frontend?

Sadly, there's no great documentation here.  But, the good news is
that it's pretty easy.  You use lang_mark_tree to mark bits of nodes
that don't exist in the generic front-end; see
cp/decl.c:lang_mark_tree for examples.  To get started, you can just
have lang_mark_tree return without doing anything -- that's fine, as
long as you have no language-specific tree nodes.  Then, add what you
need.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc mailing list