src/hotspot/share/gc/g1/g1Allocator.cpp
changeset 59221 cc3a82fc7bcb
parent 59061 df6f2350edfa
equal deleted inserted replaced
59220:72e15d757e6c 59221:cc3a82fc7bcb
   192   HeapRegion* hr = mutator_alloc_region(node_index)->get();
   192   HeapRegion* hr = mutator_alloc_region(node_index)->get();
   193   size_t max_tlab = _g1h->max_tlab_size() * wordSize;
   193   size_t max_tlab = _g1h->max_tlab_size() * wordSize;
   194   if (hr == NULL) {
   194   if (hr == NULL) {
   195     return max_tlab;
   195     return max_tlab;
   196   } else {
   196   } else {
   197     return MIN2(MAX2(hr->free(), (size_t) MinTLABSize), max_tlab);
   197     return clamp(hr->free(), MinTLABSize, max_tlab);
   198   }
   198   }
   199 }
   199 }
   200 
   200 
   201 size_t G1Allocator::used_in_alloc_regions() {
   201 size_t G1Allocator::used_in_alloc_regions() {
   202   assert(Heap_lock->owner() != NULL, "Should be owned on this thread's behalf.");
   202   assert(Heap_lock->owner() != NULL, "Should be owned on this thread's behalf.");