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

--- Comment #37 from dave.anglin at bell dot net ---
On 2019-05-22 3:41 p.m., redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77691
>
> --- Comment #36 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> Interesting. Yes, definitely similar ideas. It looks like it was solved
> differently though, as config/pa/pa.h has
>
> #define MALLOC_ABI_ALIGNMENT (TARGET_64BIT ? 128 : 64)
>
> which should get used by the aligned new code, even without my suggested 
> change
> in PR 90569.
>
> As an aside, the comment on MALLOC_ABI_ALIGNMENT says "The glibc 
> implementation
> currently provides 8-byte alignment." But glibc malloc was changed to 16-byte
> alignment a couple of years ago.
I believe I changed the glibc value because of the pthread mutex issue.

MALLOC_ABI_ALIGNMENT is defined in pa32-linux.h as follows:
#define MALLOC_ABI_ALIGNMENT 128

So, the defines are now consistent on linux.  The only remaining problem is
64-bit hpux where the actual
malloc alignment is 8 bytes.  The resource_adapter.cc test still fails on it. 
Maybe I should change BIGGEST_ALIGNMENT
and MALLOC_ABI_ALIGNMENT to match the malloc implementation?

Reply via email to