[cpp-threads] pthreads (was: RE: C++ Connections proposal)

Boehm, Hans hans.boehm at hp.com
Fri Apr 29 23:22:45 BST 2005


> From: Alexander Terekhov [mailto:alexander.terekhov at gmail.com] 
> 
> On 4/29/05, Boehm, Hans <hans.boehm at hp.com> wrote:
> > I am positive that all hardware that can run Java 1.5/5 efficiently 
> > can do this.  I think the same holds for .NET.
> 
> Both can use isolated<char> instead of char everywhere (with
> sizeof(isolated<char>) >= sizeof(char), see also RTJ's stuff 
> for driver programming). That's not the case of C++ "native" 
> (POSIX with its restriction on char size aside for a moment) 
> because it is supposed to be "closer" to hardware, I believe.
> 
I'm not sure that qualifies as "efficient".  Having byte[N]
take up say 4N bytes of memory is certainly not ideal.

I would guess it's worse than having all byte stores go through
a small routine which is not visibly preemptable.  That's presumably
what
you would really do on a uniprocessor multithreaded C++
implementation.

On a multiprocessor it's a potential issue, but again I know of no
examples.

Hans




More information about the cpp-threads mailing list