Boost logo

Boost :

Subject: Re: [boost] [lock-free] CDS -yet another lock-free library
From: Tim Blechmann (tim_at_[hidden])
Date: 2010-04-01 05:58:35


>> 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_at_[hidden]
http://tim.klingt.org
Every word is like an unnecessary stain on silence and nothingness
  Samuel Beckett

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk