https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Benoit Jacob from comment #6)
> (In reply to Marc Glisse from comment #4)
> > "the storage is obtained by
> > calling ::operator new(std::size_t)" so we can't use posix_memalign
> 
> Ouch. That's very unfortunate. I see. I would still be interested in how you
> understand 3.11/9 and how to reconcile it with that without breaking a lot
> of software.

But ::operator new(std::size_t) could always return memory aligned for the
most over-aligned type?  Thus our default new implementation could use
posix_memalign (..., MIN (size, BIGGEST_ALIGNMENT), size)?

If the user provides its own ::new then he is on its own, of course (and
doing that and using posix_memalign in it would be a workaround for this
issue?!).

Reply via email to