bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memalign: Work around Solaris bug


From: Jeffrey Walton
Subject: Re: memalign: Work around Solaris bug
Date: Thu, 31 Dec 2020 16:25:50 -0500

On Thu, Dec 31, 2020 at 4:21 PM Bruno Haible <bruno@clisp.org> wrote:
>
> On Solaris 11.4, Solaris OpenIndiana, Solaris OmniOS, I see this test failure:
>
> ../../gltests/test-memalign.c:51: assertion 'aligned2_blocks[i] != NULL' 
> failed
> FAIL test-memalign (exit status: 262)
>
> Apparently memalign() does not support alignments 1 and 2 on this platform.
>
> This patch fixes it, by using malloc() in these cases. (Bumping the alignment
> to 4 in these cases would be an alternative workaround.)

AIX may be the same. Heap memory is aligned to 4 by default, not 16.

I don't know what happens with, say, posix_memalign. I don't think
I've ever asked for an alignment of 1 or 2 when using it on AIX.

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]