On Friday, 30 September 2022 at 16:23:00 UTC, mw wrote:
On Friday, 30 September 2022 at 15:57:22 UTC, Quirin Schroll wrote:
When I do `new void[](n)`, is that buffer allocated with an alignment of 1 or what are the guarantees? How can I set an alignment? Also, is the alignment of any type guaranteed to be a power of 2?

https://dlang.org/library/core/stdc/stdlib/aligned_alloc.html

It's the C func, so check C lib doc.

and then use emplace on the C-alloc-ed memory.

Reply via email to