< prev index next >

src/hotspot/share/gc/shared/genCollectedHeap.cpp

Print this page
rev 49945 : imported patch 8191471-g1-varying-tlab-allocation
rev 49949 : imported patch 8191471-tschatzl-comments-open
rev 49950 : [mq]: 8191471-pliden-comments

@@ -1144,15 +1144,22 @@
     return _young_gen->unsafe_max_tlab_alloc();
   }
   return 0;
 }
 
-HeapWord* GenCollectedHeap::allocate_new_tlab(size_t size) {
+HeapWord* GenCollectedHeap::allocate_new_tlab(size_t min_size,
+                                              size_t requested_size,
+                                              size_t* actual_size) {
   bool gc_overhead_limit_was_exceeded;
-  return mem_allocate_work(size /* size */,
+  HeapWord* result = mem_allocate_work(requested_size /* size */,
                            true /* is_tlab */,
                            &gc_overhead_limit_was_exceeded);
+  if (result != NULL) {
+    *actual_size = requested_size;
+  }
+
+  return result;
 }
 
 // Requires "*prev_ptr" to be non-NULL.  Deletes and a block of minimal size
 // from the list headed by "*prev_ptr".
 static ScratchBlock *removeSmallestScratch(ScratchBlock **prev_ptr) {
< prev index next >