< prev index next >
src/hotspot/share/gc/z/zMarkStackAllocator.cpp
Print this page
*** 108,118 ****
// Expand
os::commit_memory_or_exit((char*)_end, expand_size, false /* executable */, "Mark stack space");
// Increment top before end to make sure another
// thread can't steal out newly expanded space.
! addr = Atomic::add(&_top, size) - size;
Atomic::add(&_end, expand_size);
return addr;
}
--- 108,118 ----
// Expand
os::commit_memory_or_exit((char*)_end, expand_size, false /* executable */, "Mark stack space");
// Increment top before end to make sure another
// thread can't steal out newly expanded space.
! addr = Atomic::fetch_and_add(&_top, size);
Atomic::add(&_end, expand_size);
return addr;
}
< prev index next >