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, 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


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