--- old/src/hotspot/share/gc/shared/space.cpp 2017-10-10 17:31:57.413342704 -0400 +++ new/src/hotspot/share/gc/shared/space.cpp 2017-10-10 17:31:56.959258693 -0400 @@ -631,7 +631,7 @@ HeapWord* obj = top(); if (pointer_delta(end(), obj) >= size) { HeapWord* new_top = obj + size; - HeapWord* result = (HeapWord*)Atomic::cmpxchg_ptr(new_top, top_addr(), obj); + HeapWord* result = Atomic::cmpxchg(new_top, top_addr(), obj); // result can be one of two: // the old top value: the exchange succeeded // otherwise: the new value of the top is returned.