Boost logo

Boost :

Subject: Re: [boost] Cache flushing in the constructors
From: Sid Sacek (ssacek_at_[hidden])
Date: 2010-08-04 10:08:24

>> Why would you need to worry about such a thing?
>> That's the responsibility of the compiler/hardware.
>> Rob Stewart

Are you sure the compiler would take care of this?

I've worked on a number of different CPU's, including the SPARC and the RS/6000, and I've never seen any special assembly emitted by the compiler that would do that. I feel like there's still something missing from the picture.

You see, normally, entering and exiting a lock takes care of the memory fencing issues for you, but constructors are naked. By that, I mean there doesn't appear to be a fence at the end of the constructor, and therefore I don't see how the current core informs all other cores that a block of memory has been modified.


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