This is the mail archive of the gcc@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]

Re: adding destroyable objects into Ggc


On Thu, Oct 20, 2011 at 09:11:02AM +0200, Marc Glisse wrote:
> On Thu, 20 Oct 2011, Basile Starynkevitch wrote:
> >>Basile Starynkevitch <basile@starynkevitch.net>
> >>>I would like to add destroyable objects into Ggc (the GCC garbage
> >>>collector, see files gcc/ggc*.[ch]).
>
> >PPL [Parma Polyhedra Library] data, like e.g. ppl_Constraint_t
> >[from header <ppl_c.h> that is, using a C API] comes to mind. If
> >you want to share PPL stuff between several passes, it can be very
> >handy to add PPL data inside GTY-ed stuff. If that GTY-ed stuff is
> >deleted by Ggc, and if the PPL destructor (e.g.
> >ppl_delete_Constraint in that case) is not called, you get a
> >memory leak.
> 
> Or you could imagine the garbage collector also reclaiming that memory.


Yes, but that precisely is the finalization machinery we are talking about.

I'm beginning to work on that; I'll experiment inside the MELT branch, but
not using any MELT specific feature or code [I'm using the MELT branch
because it would be overkill to create a special branch for that]. The
question also becomes: is it worth working on it? and who will review the
patches I might submit?

Cheers.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


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