src/hotspot/share/gc/shared/collectedHeap.hpp
branchepsilon-gc-branch
changeset 56675 483d23cdc9e5
parent 56578 e8414c8ead61
parent 50414 7efd1291e962
child 56719 a846e7bbcdfa
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp	Tue Jun 05 17:23:17 2018 +0200
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp	Wed Jun 06 10:32:59 2018 +0200
@@ -141,8 +141,15 @@
   virtual void resize_all_tlabs();
 
   // Allocate from the current thread's TLAB, with broken-out slow path.
-  inline static HeapWord* allocate_from_tlab(Klass* klass, Thread* thread, size_t size);
-  static HeapWord* allocate_from_tlab_slow(Klass* klass, Thread* thread, size_t size);
+  inline static HeapWord* allocate_from_tlab(Klass* klass, size_t size, TRAPS);
+  static HeapWord* allocate_from_tlab_slow(Klass* klass, size_t size, TRAPS);
+
+  // Raw memory allocation facilities
+  // The obj and array allocate methods are covers for these methods.
+  // mem_allocate() should never be
+  // called to allocate TLABs, only individual objects.
+  virtual HeapWord* mem_allocate(size_t size,
+                                 bool* gc_overhead_limit_was_exceeded) = 0;
 
   // Allocate an uninitialized block of the given size, or returns NULL if
   // this is impossible.
@@ -310,12 +317,12 @@
   inline static oop array_allocate_nozero(Klass* klass, int size, int length, TRAPS);
   inline static oop class_allocate(Klass* klass, int size, TRAPS);
 
-  // Raw memory allocation facilities
-  // The obj and array allocate methods are covers for these methods.
-  // mem_allocate() should never be
-  // called to allocate TLABs, only individual objects.
-  virtual HeapWord* mem_allocate(size_t size,
-                                 bool* gc_overhead_limit_was_exceeded) = 0;
+  // Raw memory allocation. This may or may not use TLAB allocations to satisfy the
+  // allocation. A GC implementation may override this function to satisfy the allocation
+  // in any way. But the default is to try a TLAB allocation, and otherwise perform
+  // mem_allocate.
+  virtual HeapWord* obj_allocate_raw(Klass* klass, size_t size,
+                                     bool* gc_overhead_limit_was_exceeded, TRAPS);
 
   // Utilities for turning raw memory into filler objects.
   //