On Thu, Aug 22, 2013 at 9:56 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, Aug 22, 2013 at 09:53:35AM -0500, Gabriel Dos Reis wrote: >> On Thu, Aug 22, 2013 at 9:38 AM, Alexander Monakov <amona...@ispras.ru> >> wrote: >> > On Thu, 22 Aug 2013, Gabriel Dos Reis wrote: >> >> > - I would like to recall issue if we can make NEW_EXPR annotated with >> >> > MALLOC attribute. Without it, it is basically impossible to track >> >> > any dynamically allocated objects in the middle-end >> >> >> >> operator new is replaceable by user program. >> > >> > But so is malloc? >> >> no, malloc isn't replaceable. > > Is it such a good idea to replace something gcc during bootstrap can > optimize well (malloc/xmalloc etc.) with something that it can't (operator > new)?
I think we may have terminology problems here. A placement-new, like the one I used in my recent patch, is operationally the identity function (in addition to informing the alias analyzer about the beginning of a new object lifetime). 'operator new' is an allocator function. I didn't use it. -- Gaby