< prev index next >

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

Print this page

233   // memory that the vm could make available for storing 'normal' java objects.
234   // This is based on the reserved address space, but should not include space
235   // that the vm uses internally for bookkeeping or temporary storage
236   // (e.g., in the case of the young gen, one of the survivor
237   // spaces).
238   virtual size_t max_capacity() const = 0;
239 
240   // Returns "TRUE" iff "p" points into the committed areas of the heap.
241   // This method can be expensive so avoid using it in performance critical
242   // code.
243   virtual bool is_in(const void* p) const = 0;
244 
245   DEBUG_ONLY(bool is_in_or_null(const void* p) const { return p == NULL || is_in(p); })
246 
247   virtual uint32_t hash_oop(oop obj) const;
248 
249   void set_gc_cause(GCCause::Cause v);
250   GCCause::Cause gc_cause() { return _gc_cause; }
251 
252   oop obj_allocate(Klass* klass, int size, TRAPS);

253   virtual oop array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS);
254   oop class_allocate(Klass* klass, int size, TRAPS);
255 
256   // Utilities for turning raw memory into filler objects.
257   //
258   // min_fill_size() is the smallest region that can be filled.
259   // fill_with_objects() can fill arbitrary-sized regions of the heap using
260   // multiple objects.  fill_with_object() is for regions known to be smaller
261   // than the largest array of integers; it uses a single object to fill the
262   // region and has slightly less overhead.
263   static size_t min_fill_size() {
264     return size_t(align_object_size(oopDesc::header_size()));
265   }
266 
267   static void fill_with_objects(HeapWord* start, size_t words, bool zap = true);
268 
269   static void fill_with_object(HeapWord* start, size_t words, bool zap = true);
270   static void fill_with_object(MemRegion region, bool zap = true) {
271     fill_with_object(region.start(), region.word_size(), zap);
272   }

233   // memory that the vm could make available for storing 'normal' java objects.
234   // This is based on the reserved address space, but should not include space
235   // that the vm uses internally for bookkeeping or temporary storage
236   // (e.g., in the case of the young gen, one of the survivor
237   // spaces).
238   virtual size_t max_capacity() const = 0;
239 
240   // Returns "TRUE" iff "p" points into the committed areas of the heap.
241   // This method can be expensive so avoid using it in performance critical
242   // code.
243   virtual bool is_in(const void* p) const = 0;
244 
245   DEBUG_ONLY(bool is_in_or_null(const void* p) const { return p == NULL || is_in(p); })
246 
247   virtual uint32_t hash_oop(oop obj) const;
248 
249   void set_gc_cause(GCCause::Cause v);
250   GCCause::Cause gc_cause() { return _gc_cause; }
251 
252   oop obj_allocate(Klass* klass, int size, TRAPS);
253   oop obj_buffer_allocate(Klass* klass, int size, TRAPS); // doesn't clear memory
254   virtual oop array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS);
255   oop class_allocate(Klass* klass, int size, TRAPS);
256 
257   // Utilities for turning raw memory into filler objects.
258   //
259   // min_fill_size() is the smallest region that can be filled.
260   // fill_with_objects() can fill arbitrary-sized regions of the heap using
261   // multiple objects.  fill_with_object() is for regions known to be smaller
262   // than the largest array of integers; it uses a single object to fill the
263   // region and has slightly less overhead.
264   static size_t min_fill_size() {
265     return size_t(align_object_size(oopDesc::header_size()));
266   }
267 
268   static void fill_with_objects(HeapWord* start, size_t words, bool zap = true);
269 
270   static void fill_with_object(HeapWord* start, size_t words, bool zap = true);
271   static void fill_with_object(MemRegion region, bool zap = true) {
272     fill_with_object(region.start(), region.word_size(), zap);
273   }
< prev index next >