< prev index next >

src/hotspot/share/gc/z/zPage.inline.hpp

Print this page

        

*** 253,263 **** if (new_top > end()) { // Not enough space left return 0; } ! const uintptr_t prev_top = Atomic::cmpxchg(new_top, &_top, addr); if (prev_top == addr) { // Success return ZAddress::good(addr); } --- 253,263 ---- if (new_top > end()) { // Not enough space left return 0; } ! const uintptr_t prev_top = Atomic::cmpxchg(&_top, addr, new_top); if (prev_top == addr) { // Success return ZAddress::good(addr); }
*** 297,307 **** if (new_top != offset) { // Failed to undo allocation, not the last allocated object return false; } ! const uintptr_t prev_top = Atomic::cmpxchg(new_top, &_top, old_top); if (prev_top == old_top) { // Success return true; } --- 297,307 ---- if (new_top != offset) { // Failed to undo allocation, not the last allocated object return false; } ! const uintptr_t prev_top = Atomic::cmpxchg(&_top, old_top, new_top); if (prev_top == old_top) { // Success return true; }
< prev index next >