On 3 May 2012 12:27, Don Clugston <[email protected]> wrote: > On 30/04/12 01:03, Manu wrote: > >> On 30 April 2012 01:24, Tove <[email protected] >> <mailto:[email protected]>> wrote: >> >> On Sunday, 29 April 2012 at 22:13:22 UTC, Manu wrote: >> >> Is it technically possible to have a precise GC clean up all >> unreferenced >> memory in one big pass? >> >> >> yes, but unless it's also moving/compacting... one would suffer >> memory fragmentation... so I would imagine TempAlloc is a better fit? >> >> >> In some cases I'm comfortable with that type of fragmentation (large >> regularly sized resources), although that leads me to a gaping hole in >> D's allocation system... >> >> <OT, but still very important> >> There is no way to request aligned memory. I can't even specify an >> >> alignment on a user type and expect it to be aligned if I create one on >> the stack, let alone the heap >_< >> It seems I can request alignment for items within a struct, but I can't >> align the struct its self. In addition, a struct doesn't inherit the >> alignment of its aligned members, so the struct is allocated unaligned, >> and the aligned member fails its promise anyway. >> > > Bug 2278. >
Why do you suggest alignment to only 8 bytes (not 16)? MOVAPS and friends operate on 16 byte aligned data, and all non-x86 architectures are strictly 16byte aligned with no unaligned alternative possible. I'd like to see that proposal extended to arbitrary power-of-2, and to allow align(n) applied to structs/classes.
