Boost logo

Boost :

Subject: Re: [boost] [lock-free] CDS -yet another lock-free library
From: Khiszinsky, Maxim (Maxim.Khiszinsky_at_[hidden])
Date: 2010-04-01 07:48:41

Tim Blechmann wrote:
> using an aligned storage allocator won't help, if the struct is constructed
via placement new.

Yes, Tim, and you are right.
The lib is actively used placement new in dynamic data structs. There are many assertions in the CDS code about unaligned new'ed data as the marks of my fight with misalignment.
At first glance the CDS's implementation of Tagged Pointer memory management is particularly suspicious.
I should inspect the lib more accurately.

> one could over-allocate memory to force alignment at run-time, but that may
cause a higher overhead than using cmpxchg ...

I don't like over-allocation and run-time alignment too :(
However, using CAS for loading only (or for storing only)... IMHO it is extreme solution, and CAS has completely different semantics.

Thanks, Tim, to focus my attention on alignment problem.

Regards, Max

Boost list run by bdawes at, gregod at, cpdaniel at, john at