src/hotspot/share/gc/z/zMarkStackAllocator.cpp
changeset 59249 29b0d0b61615
parent 59039 c60978f87d45
child 59252 623722a6aeb9
equal deleted inserted replaced
59248:e92153ed8bdc 59249:29b0d0b61615
   108   // Expand
   108   // Expand
   109   os::commit_memory_or_exit((char*)_end, expand_size, false /* executable */, "Mark stack space");
   109   os::commit_memory_or_exit((char*)_end, expand_size, false /* executable */, "Mark stack space");
   110 
   110 
   111   // Increment top before end to make sure another
   111   // Increment top before end to make sure another
   112   // thread can't steal out newly expanded space.
   112   // thread can't steal out newly expanded space.
   113   addr = Atomic::add(size, &_top) - size;
   113   addr = Atomic::add(&_top, size) - size;
   114   Atomic::add(expand_size, &_end);
   114   Atomic::add(&_end, expand_size);
   115 
   115 
   116   return addr;
   116   return addr;
   117 }
   117 }
   118 
   118 
   119 uintptr_t ZMarkStackSpace::alloc(size_t size) {
   119 uintptr_t ZMarkStackSpace::alloc(size_t size) {