src/hotspot/share/gc/shared/collectedHeap.inline.hpp
changeset 53191 a257992e1e4d
parent 50882 80abf702eed8
child 53244 9807daeb47c4
--- a/src/hotspot/share/gc/shared/collectedHeap.inline.hpp	Tue Jan 08 13:40:57 2019 +0530
+++ b/src/hotspot/share/gc/shared/collectedHeap.inline.hpp	Tue Jan 08 10:54:00 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 #define SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
 
 #include "gc/shared/collectedHeap.hpp"
+#include "gc/shared/memAllocator.hpp"
 #include "oops/oop.inline.hpp"
 #include "utilities/align.hpp"
 
@@ -66,4 +67,19 @@
   }
 }
 
+inline oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
+  ObjAllocator allocator(klass, size, THREAD);
+  return allocator.allocate();
+}
+
+inline oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
+  ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
+  return allocator.allocate();
+}
+
+inline oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
+  ClassAllocator allocator(klass, size, THREAD);
+  return allocator.allocate();
+}
+
 #endif // SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP