
1 Apr
2010
1 Apr
'10
9:58 a.m.
you may run into issues, when using aligned members in heap-allocated structs
Hmm... You are right. There is alloc_aligned.h header for each supported OS in the CDS lib. However, it seems they are not used now. I need inspect the CDS code for this problem more carefully. I have a suspicion...
using an aligned storage allocator won't help, if the struct is constructed via placement new. one could over-allocate memory to force alignment at run-time, but that may cause a higher overhead than using cmpxchg ... cheers, tim -- tim@klingt.org http://tim.klingt.org Every word is like an unnecessary stain on silence and nothingness Samuel Beckett