< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.hpp

Print this page

1162   // distinguishable and the size of each is determinable.
1163 
1164   // Returns the address of the start of the "block" that contains the
1165   // address "addr".  We say "blocks" instead of "object" since some heaps
1166   // may not pack objects densely; a chunk may either be an object or a
1167   // non-object.
1168   HeapWord* block_start(const void* addr) const;
1169 
1170   // Requires "addr" to be the start of a block, and returns "TRUE" iff
1171   // the block is an object.
1172   bool block_is_obj(const HeapWord* addr) const;
1173 
1174   // Section on thread-local allocation buffers (TLABs)
1175   // See CollectedHeap for semantics.
1176 
1177   size_t tlab_capacity(Thread* ignored) const;
1178   size_t tlab_used(Thread* ignored) const;
1179   size_t max_tlab_size() const;
1180   size_t unsafe_max_tlab_alloc(Thread* ignored) const;
1181 
1182   inline bool is_in_young(const oop obj);

1183 
1184   // Returns "true" iff the given word_size is "very large".
1185   static bool is_humongous(size_t word_size) {
1186     // Note this has to be strictly greater-than as the TLABs
1187     // are capped at the humongous threshold and we want to
1188     // ensure that we don't try to allocate a TLAB as
1189     // humongous and that we don't allocate a humongous
1190     // object in a TLAB.
1191     return word_size > _humongous_object_threshold_in_words;
1192   }
1193 
1194   // Returns the humongous threshold for a specific region size
1195   static size_t humongous_threshold_for(size_t region_size) {
1196     return (region_size / 2);
1197   }
1198 
1199   // Returns the number of regions the humongous object of the given word size
1200   // requires.
1201   static size_t humongous_obj_size_in_regions(size_t word_size);
1202 

1162   // distinguishable and the size of each is determinable.
1163 
1164   // Returns the address of the start of the "block" that contains the
1165   // address "addr".  We say "blocks" instead of "object" since some heaps
1166   // may not pack objects densely; a chunk may either be an object or a
1167   // non-object.
1168   HeapWord* block_start(const void* addr) const;
1169 
1170   // Requires "addr" to be the start of a block, and returns "TRUE" iff
1171   // the block is an object.
1172   bool block_is_obj(const HeapWord* addr) const;
1173 
1174   // Section on thread-local allocation buffers (TLABs)
1175   // See CollectedHeap for semantics.
1176 
1177   size_t tlab_capacity(Thread* ignored) const;
1178   size_t tlab_used(Thread* ignored) const;
1179   size_t max_tlab_size() const;
1180   size_t unsafe_max_tlab_alloc(Thread* ignored) const;
1181 
1182   inline bool is_in_young(const oop obj) const;
1183   virtual inline bool requires_barriers(oop obj) const;
1184 
1185   // Returns "true" iff the given word_size is "very large".
1186   static bool is_humongous(size_t word_size) {
1187     // Note this has to be strictly greater-than as the TLABs
1188     // are capped at the humongous threshold and we want to
1189     // ensure that we don't try to allocate a TLAB as
1190     // humongous and that we don't allocate a humongous
1191     // object in a TLAB.
1192     return word_size > _humongous_object_threshold_in_words;
1193   }
1194 
1195   // Returns the humongous threshold for a specific region size
1196   static size_t humongous_threshold_for(size_t region_size) {
1197     return (region_size / 2);
1198   }
1199 
1200   // Returns the number of regions the humongous object of the given word size
1201   // requires.
1202   static size_t humongous_obj_size_in_regions(size_t word_size);
1203 
< prev index next >