From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23801 invoked by alias); 20 Oct 2011 15:14:09 -0000 Received: (qmail 23790 invoked by uid 22791); 20 Oct 2011 15:14:08 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail4-relais-sop.national.inria.fr (HELO mail4-relais-sop.national.inria.fr) (192.134.164.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Oct 2011 15:13:54 +0000 Received: from ip-133.net-81-220-116.brest.rev.numericable.fr (HELO laptop-mg.local) ([81.220.116.133]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Oct 2011 17:13:50 +0200 Date: Thu, 20 Oct 2011 15:34:00 -0000 From: Marc Glisse Reply-To: gcc@gcc.gnu.org To: Basile Starynkevitch cc: gcc@gcc.gnu.org Subject: Re: adding destroyable objects into Ggc In-Reply-To: <20111020085324.GA12472@ours.starynkevitch.net> Message-ID: References: <20111018171201.361304028ab94f102f827bd2@starynkevitch.net> <20111018191350.470cd6b1cd291373d5ff3f2c@starynkevitch.net> <20111020080753.a895eae452bb25e312ebf617@starynkevitch.net> <20111020081245.GA12085@ours.starynkevitch.net> <20111020085324.GA12472@ours.starynkevitch.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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/msg00358.txt.bz2 On Thu, 20 Oct 2011, Basile Starynkevitch wrote: > Suppose someone is coding a new plugin, which adds several passes to GCC (so > need the data to be managed by Ggc, because it is not internal to one single > pass.). Suppose the plugin is coded in C++, and that it uses some standard > C++ collection (e.g. std::vector or std::map) of C++ objects mixing pointers > to GTY-ed data (e.g. gimple) and PPL instances (in C++). The data used by > the plugin would better be GTY-ed. And it points to both GTY-ed & PPL data, > so need to be finalized. Can't you use GTY-ed memory in PPL? Sorry for the naive question, but std::vector can take an allocator parameter, gmp lets you specify an allocation function... (note that I have never looked at Ggc so my question may be off...) -- Marc Glisse