This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: RFA (libstdc++): PATCH to implement C++17 over-aligned new


(trimming the Cc: list)

On Fri, 16 Sep 2016, Jonathan Wakely wrote:

I missed 18.6.2/1 which is clear that we don't have to support invalid
alignments passed to operator new, so I'm committing this.

Yes, I had missed it as well :-( Thanks for the patch.

Random comments (we probably don't want to act on them):

* gcc guesses that rem != 0, but I expect that to be an unusual case, __builtin_expect could help gcc make a different choice * there is also the version sz = (sz + (align - 1)) & ~(align - 1) to avoid a (very predictable so probably cheap) branch * this size adjustment could in principle cause an overflow that we will not detect

--
Marc Glisse


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