From: Maxim Yegorushkin (maxim.yegorushkin_at_[hidden])
Date: 2005-08-25 09:01:20
On Thu, 25 Aug 2005 17:34:59 +0400, Peter Dimov <pdimov_at_[hidden]> wrote:
> Maxim Yegorushkin wrote:
>> I just skimmed through boost/detail/quick_allocator.hpp and noticed
>> that quick_allocator causes false sharing on SMP. It happens when
>> several counters are allocated within the same cache line and those
>> counters are used by different processors, thus thrashing processors'
>> cache lines when the counter is written, even when the counter is used
>> by a single processor only.
> What do you suggest?
IMO, patching it to avoid false sharing may require too much effort. Not
quite constructive, but I would stick to using standard new/delete and
replaced libc provided malloc() with hoard's one for my project.
-- Maxim Yegorushkin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk