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: XNEW and consorts


On Thu, Aug 22, 2013 at 8:51 AM, Dodji Seketeli <dodji@seketeli.org> wrote:
> Richard Biener <richard.guenther@gmail.com> a écrit:
>
>> Support for constructing and destructing GC objects will be another
>> story of course.
>
> Just curious.  Does supporting this take more than just defining new and delete
> operators that call ggc_alloc_*/ggc_free in there?
>
> (OK, that and defining the object walking routines that the GC needs)

A little it more.  Ideally, we would want placement-new forms
for these, e.g.

    new (ggc) T(args);

and then audit all the places we use ggc_alloc, etc.

-- Gaby


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