RFA (libstdc++): PATCH to implement C++17 over-aligned new
Jonathan Wakely
jwakely@redhat.com
Fri Sep 16 09:04:00 GMT 2016
On 16/09/16 09:04 +0200, Rainer Orth wrote:
>Hi Jason,
>
>> OK, one more:
>
>this works just fine on both sparc-sun-solaris2.12 and
>i386-pc-solaris2.12.
>
>Once Jonathan's patch to heed aligned_alloc's requirement on size being
>a multiple of alignment is in, all is fine on Solaris.
I've got a slightly different fix now.
We only need to make the size a multiple of alignment for
aligned_alloc, however for posix_memalign we need to ensure the
alignment is a multiple of sizeof(void*).
I'm testing this now (but only on x86_64 GNU/Linux where it wasn't
failing anyway).
Would using __builtin_expect (sz == 0, false) make sense? Surely it's
rare to try to allocate zero bytes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1623 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160916/344d6ed4/attachment.bin>
More information about the Libstdc++
mailing list