< prev index next >

src/hotspot/share/gc/shared/collectedHeap.inline.hpp

Print this page

19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 #ifndef SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
26 #define SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
27 
28 #include "gc/shared/collectedHeap.hpp"
29 
30 #include "gc/shared/memAllocator.hpp"
31 #include "oops/oop.inline.hpp"
32 #include "utilities/align.hpp"
33 
34 inline oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
35   ObjAllocator allocator(klass, size, THREAD);
36   return allocator.allocate();
37 }
38 





39 inline oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
40   ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
41   return allocator.allocate();
42 }
43 
44 inline oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
45   ClassAllocator allocator(klass, size, THREAD);
46   return allocator.allocate();
47 }
48 
49 #endif // SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP

19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 #ifndef SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
26 #define SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
27 
28 #include "gc/shared/collectedHeap.hpp"
29 
30 #include "gc/shared/memAllocator.hpp"
31 #include "oops/oop.inline.hpp"
32 #include "utilities/align.hpp"
33 
34 inline oop CollectedHeap::obj_allocate(Klass* klass, int size, TRAPS) {
35   ObjAllocator allocator(klass, size, THREAD);
36   return allocator.allocate();
37 }
38 
39 inline oop CollectedHeap::obj_buffer_allocate(Klass* klass, int size, TRAPS) {
40   ObjBufferAllocator allocator(klass, size, THREAD);
41   return allocator.allocate();
42 }
43 
44 inline oop CollectedHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
45   ObjArrayAllocator allocator(klass, size, length, do_zero, THREAD);
46   return allocator.allocate();
47 }
48 
49 inline oop CollectedHeap::class_allocate(Klass* klass, int size, TRAPS) {
50   ClassAllocator allocator(klass, size, THREAD);
51   return allocator.allocate();
52 }
53 
54 #endif // SHARE_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
< prev index next >