< prev index next >

src/share/vm/memory/defNewGeneration.hpp

Print this page




 238   HeapWord** end_addr() const;
 239 
 240   // Thread-local allocation buffers
 241   bool supports_tlab_allocation() const { return true; }
 242   size_t tlab_capacity() const;
 243   size_t tlab_used() const;
 244   size_t unsafe_max_tlab_alloc() const;
 245 
 246   // Grow the generation by the specified number of bytes.
 247   // The size of bytes is assumed to be properly aligned.
 248   // Return true if the expansion was successful.
 249   bool expand(size_t bytes);
 250 
 251   // DefNewGeneration cannot currently expand except at
 252   // a GC.
 253   virtual bool is_maximal_no_gc() const { return true; }
 254 
 255   // Iteration
 256   void object_iterate(ObjectClosure* blk);
 257 
 258   void younger_refs_iterate(OopsInGenClosure* cl);
 259 
 260   void space_iterate(SpaceClosure* blk, bool usedOnly = false);
 261 
 262   // Allocation support
 263   virtual bool should_allocate(size_t word_size, bool is_tlab) {
 264     assert(UseTLAB || !is_tlab, "Should not allocate tlab");
 265 
 266     size_t overflow_limit    = (size_t)1 << (BitsPerSize_t - LogHeapWordSize);
 267 
 268     const bool non_zero      = word_size > 0;
 269     const bool overflows     = word_size >= overflow_limit;
 270     const bool check_too_big = _pretenure_size_threshold_words > 0;
 271     const bool not_too_big   = word_size < _pretenure_size_threshold_words;
 272     const bool size_ok       = is_tlab || !check_too_big || not_too_big;
 273 
 274     bool result = !overflows &&
 275                   non_zero   &&
 276                   size_ok;
 277 
 278     return result;




 238   HeapWord** end_addr() const;
 239 
 240   // Thread-local allocation buffers
 241   bool supports_tlab_allocation() const { return true; }
 242   size_t tlab_capacity() const;
 243   size_t tlab_used() const;
 244   size_t unsafe_max_tlab_alloc() const;
 245 
 246   // Grow the generation by the specified number of bytes.
 247   // The size of bytes is assumed to be properly aligned.
 248   // Return true if the expansion was successful.
 249   bool expand(size_t bytes);
 250 
 251   // DefNewGeneration cannot currently expand except at
 252   // a GC.
 253   virtual bool is_maximal_no_gc() const { return true; }
 254 
 255   // Iteration
 256   void object_iterate(ObjectClosure* blk);
 257 
 258   void younger_refs_iterate(OopsInGenClosure* cl, uint n_threads);
 259 
 260   void space_iterate(SpaceClosure* blk, bool usedOnly = false);
 261 
 262   // Allocation support
 263   virtual bool should_allocate(size_t word_size, bool is_tlab) {
 264     assert(UseTLAB || !is_tlab, "Should not allocate tlab");
 265 
 266     size_t overflow_limit    = (size_t)1 << (BitsPerSize_t - LogHeapWordSize);
 267 
 268     const bool non_zero      = word_size > 0;
 269     const bool overflows     = word_size >= overflow_limit;
 270     const bool check_too_big = _pretenure_size_threshold_words > 0;
 271     const bool not_too_big   = word_size < _pretenure_size_threshold_words;
 272     const bool size_ok       = is_tlab || !check_too_big || not_too_big;
 273 
 274     bool result = !overflows &&
 275                   non_zero   &&
 276                   size_ok;
 277 
 278     return result;


< prev index next >