adding destroyable objects into Ggc
Marc Glisse
marc.glisse@inria.fr
Thu Oct 20 15:34:00 GMT 2011
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
More information about the Gcc
mailing list