< prev index next >

src/hotspot/share/gc/shared/memAllocator.hpp

Print this page

 72   // that must be parseable as an oop by concurrent collectors.
 73   oop finish(HeapWord* mem) const;
 74 
 75   // Raw memory allocation. This will try to do a TLAB allocation, and otherwise fall
 76   // back to calling CollectedHeap::mem_allocate().
 77   HeapWord* mem_allocate(Allocation& allocation) const;
 78 
 79 public:
 80   // Allocate and fully construct the object, and perform various instrumentation. Could safepoint.
 81   oop allocate() const;
 82 };
 83 
 84 class ObjAllocator: public MemAllocator {
 85 public:
 86   ObjAllocator(Klass* klass, size_t word_size, Thread* thread = Thread::current())
 87     : MemAllocator(klass, word_size, thread) {}
 88 
 89   virtual oop initialize(HeapWord* mem) const;
 90 };
 91 








 92 class ObjArrayAllocator: public MemAllocator {
 93 protected:
 94   const int  _length;
 95   const bool _do_zero;
 96 
 97   void mem_zap_end_padding(HeapWord* mem) const PRODUCT_RETURN;
 98 
 99 public:
100   ObjArrayAllocator(Klass* klass, size_t word_size, int length, bool do_zero,
101                     Thread* thread = Thread::current())
102     : MemAllocator(klass, word_size, thread),
103       _length(length),
104       _do_zero(do_zero) {}
105 
106   virtual oop initialize(HeapWord* mem) const;
107 };
108 
109 class ClassAllocator: public MemAllocator {
110 public:
111   ClassAllocator(Klass* klass, size_t word_size, Thread* thread = Thread::current())

 72   // that must be parseable as an oop by concurrent collectors.
 73   oop finish(HeapWord* mem) const;
 74 
 75   // Raw memory allocation. This will try to do a TLAB allocation, and otherwise fall
 76   // back to calling CollectedHeap::mem_allocate().
 77   HeapWord* mem_allocate(Allocation& allocation) const;
 78 
 79 public:
 80   // Allocate and fully construct the object, and perform various instrumentation. Could safepoint.
 81   oop allocate() const;
 82 };
 83 
 84 class ObjAllocator: public MemAllocator {
 85 public:
 86   ObjAllocator(Klass* klass, size_t word_size, Thread* thread = Thread::current())
 87     : MemAllocator(klass, word_size, thread) {}
 88 
 89   virtual oop initialize(HeapWord* mem) const;
 90 };
 91 
 92 class ObjBufferAllocator: public MemAllocator {
 93 public:
 94   ObjBufferAllocator(Klass* klass, size_t word_size, Thread* thread = Thread::current())
 95     : MemAllocator(klass, word_size, thread) {}
 96   virtual oop initialize(HeapWord* mem) const;
 97 };
 98 
 99 
100 class ObjArrayAllocator: public MemAllocator {
101 protected:
102   const int  _length;
103   const bool _do_zero;
104 
105   void mem_zap_end_padding(HeapWord* mem) const PRODUCT_RETURN;
106 
107 public:
108   ObjArrayAllocator(Klass* klass, size_t word_size, int length, bool do_zero,
109                     Thread* thread = Thread::current())
110     : MemAllocator(klass, word_size, thread),
111       _length(length),
112       _do_zero(do_zero) {}
113 
114   virtual oop initialize(HeapWord* mem) const;
115 };
116 
117 class ClassAllocator: public MemAllocator {
118 public:
119   ClassAllocator(Klass* klass, size_t word_size, Thread* thread = Thread::current())
< prev index next >