From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20066 invoked by alias); 20 Oct 2011 08:13:07 -0000 Received: (qmail 20037 invoked by uid 22791); 20 Oct 2011 08:13:03 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp-154-thursday.nerim.net (HELO maiev.nerim.net) (194.79.134.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Oct 2011 08:12:47 +0000 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by maiev.nerim.net (Postfix) with ESMTPS id BEFE02E02B for ; Thu, 20 Oct 2011 10:12:45 +0200 (CEST) Received: from basile18 by hector.lesours with local (Exim 4.76) (envelope-from ) id 1RGnk5-00039Z-7g for gcc@gcc.gnu.org; Thu, 20 Oct 2011 10:12:45 +0200 Date: Thu, 20 Oct 2011 08:38:00 -0000 From: Basile Starynkevitch To: gcc@gcc.gnu.org Subject: Re: adding destroyable objects into Ggc Message-ID: <20111020081245.GA12085@ours.starynkevitch.net> References: <20111018171201.361304028ab94f102f827bd2@starynkevitch.net> <20111018191350.470cd6b1cd291373d5ff3f2c@starynkevitch.net> <20111020080753.a895eae452bb25e312ebf617@starynkevitch.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00337.txt.bz2 On Thu, Oct 20, 2011 at 09:11:02AM +0200, Marc Glisse wrote: > On Thu, 20 Oct 2011, Basile Starynkevitch wrote: > >>Basile Starynkevitch > >>>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 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: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***