This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc and a Garbage Collector.
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: stephane dot wirtel at belgacom dot net (Stephane Wirtel)
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 19 Aug 2005 20:07:14 -0400 (EDT)
- Subject: Re: Gcc and a Garbage Collector.
>
> Hi,
>
> With this page from Wikipedia, http://en.wikipedia.org/wiki/GNU_Compiler_Collection, in the "See also" section,
> there is a sentence about a Garbage collected included in GCC.
>
> Is it true ?
Yes.
> If yes, how can I use it with my c++ source code ? (documentation,
> articles, tutorials...).
It is a very simple mark and sweep GC and not realy useful for most other projects.
You mark each struct for GCable and all static and global variables too. You cannot
have only a reference to a GCable on the stack (it has to be in a GC marked variable
too) when the gc is called.
-- Pinski