Using C++11+ in hotspot

John Rose john.r.rose at oracle.com
Mon Aug 6 18:12:55 UTC 2018


On Aug 5, 2018, at 8:30 AM, Martin Buchholz <martinrb at google.com> wrote:
> 
> Thanks to whoever added the comment long ago.

FTR I think it was Steffen Grarup.  We were just learning about MT safety at the time.
The copy conjoint/disjoint APIs were not yet in existence.  I think they came around
2003, and Paul Hohensee's name is all over the SCCS history there.

s 00008/00002/00762
d D 1.147 99/02/17 10:14:36 steffen 235 233
…
I 235
static inline void copy_table(address* from, address* to, int size) {
  // Copy non-overlapping tables. The copy has to occur word wise for MT safety.
  while (size-- > 0) *to++ = *from++;
}

Today, that loop should be recoded to use copy, and copy in turn needs to
do whatever magic is required to force word-atomic access on non-atomic data.

— John


More information about the workshop-discuss mailing list