This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: XNEW and consorts
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Dodji Seketeli <dodji at seketeli dot org>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 22 Aug 2013 09:25:59 -0500
- Subject: Re: XNEW and consorts
- References: <CAAiZkiBr46u5G8CYsWOSXDkeEjiocunsCNqK-mvTrisb_E6PJw at mail dot gmail dot com> <f960b335-e4bf-48b6-a97d-10e400dca2c6 at email dot android dot com> <87fvu1kf5f dot fsf at seketeli dot org>
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