[EMAIL PROTECTED] writes:

>   - the default versions of operator new and the aligned version of
>     operator new should be defined in the same section.  That way,
>     when a user overrides the default operator new, they will get
>     a link error (duplicate definitions of new) unless they also
>     define the aligned version of operator new.

That would be a bad idea since it would break standard conformant
programs which only override the default operator new.

You are implicitly assuming that we know the alignment of memory
returned by new.  If we know that, then whenever we need aligned
memory, we can ask for a bit more memory and force the alignment.
That will always work and avoids the concerns of overriding new.  We
can generate more optimal code by providing a command line option
which specifies the alignment of memory returned by new.

Ian

Reply via email to