Re: [PATCH] PR libstdc++/79190 add fallback aligned_alloc implementation

2017-01-26 Thread Jonathan Wakely
On 26/01/17 01:05 +0100, Jakub Jelinek wrote: On Tue, Jan 24, 2017 at 06:33:51PM +, Jonathan Wakely wrote: --- a/libstdc++-v3/libsupc++/new_opa.cc +++ b/libstdc++-v3/libsupc++/new_opa.cc @@ -55,9 +55,30 @@ extern "C" void *memalign(std::size_t boundary, std::size_t size); #endif #define

Re: [PATCH] PR libstdc++/79190 add fallback aligned_alloc implementation

2017-01-25 Thread Jakub Jelinek
On Tue, Jan 24, 2017 at 06:33:51PM +, Jonathan Wakely wrote: > --- a/libstdc++-v3/libsupc++/new_opa.cc > +++ b/libstdc++-v3/libsupc++/new_opa.cc > @@ -55,9 +55,30 @@ extern "C" void *memalign(std::size_t boundary, > std::size_t size); > #endif > #define aligned_alloc memalign > #else > -//

[PATCH] PR libstdc++/79190 add fallback aligned_alloc implementation

2017-01-24 Thread Jonathan Wakely
This provides a definition of aligned_alloc for targets which have none of aligned_alloc, posix_memalign, memalign or _aligned_alloc. The code is based on gcc/config/i386/gmm_malloc.h but modified to only use sizeof(void*) not 2*sizeof(void*), because I don't understand why that's used in