*** 68,78 **** if (new_top > end) { // Not enough space left return 0; } ! const uintptr_t prev_top = Atomic::cmpxchg(new_top, &_top, top); if (prev_top == top) { // Success return top; } --- 68,78 ---- if (new_top > end) { // Not enough space left return 0; } ! const uintptr_t prev_top = Atomic::cmpxchg(&_top, top, new_top); if (prev_top == top) { // Success return top; }