core.runtime.GC memory alignment

John Colvin john.loughran.colvin at gmail.com
Sun Oct 27 14:20:11 PDT 2013


On Sunday, 27 October 2013 at 20:50:30 UTC, monarch_dodra wrote:
> On Sunday, 27 October 2013 at 20:30:05 UTC, Andrei Alexandrescu 
> wrote:
>> Yah, something like that. I found align(NNN) underspecified 
>> and underpowered for my work with allocators. As a simple 
>> matter, NNN must be a literal, not a compile-time expression. 
>> You can't even write e.g. align(size_t.alignof), which is 
>> fairly basic.
>>
>>
>> Andrei

> "alignment relative to the start of the struct"

what does that even mean? Alignment means (address % alignment) 
== 0

what would be the use case for guaranteeing ((fieldAddress - 
StructAddress) % alignment) == 0 that can't be just as easily 
done using normal alignment


More information about the Digitalmars-d mailing list