__vector(ubyte[32]) misalignment
Bruce Carneal
bcarneal at gmail.com
Sun Aug 9 01:56:54 UTC 2020
On Sunday, 9 August 2020 at 01:03:51 UTC, Bruce Carneal wrote:
> The .alignof attribute of __vector(ubyte[32]) is 32 but
> initializing an array of such vectors via an assignment to
> .length has given me 16 byte alignment (and subsequent seg
> faults which I suspect are related).
>
> Is sub .alignof alignment expected here? IOW, do I have to
> manually manage memory if I want alignments above 16?
Manually managing the alignment eliminated the seg faulting.
Additionally, I found that std.experimental.mallocator
Mallocator.alignment is 16.
So, is the misalignment baked in at this point?
More information about the Digitalmars-d-learn
mailing list