src/share/vm/memory/genCollectedHeap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-g1-mmap Cdiff src/share/vm/memory/genCollectedHeap.hpp

src/share/vm/memory/genCollectedHeap.hpp

Print this page

        

*** 366,394 **** // Return "true" if all generations have reached the // maximal committed limit that they can reach, without a garbage // collection. virtual bool is_maximal_no_gc() const; ! // Return the generation before "gen", or else NULL. Generation* prev_gen(Generation* gen) const { int l = gen->level(); ! if (l == 0) return NULL; ! else return _gens[l-1]; } ! // Return the generation after "gen", or else NULL. Generation* next_gen(Generation* gen) const { int l = gen->level() + 1; ! if (l == _n_gens) return NULL; ! else return _gens[l]; } Generation* get_gen(int i) const { ! if (i >= 0 && i < _n_gens) return _gens[i]; - else - return NULL; } int n_gens() const { assert(_n_gens == gen_policy()->number_of_generations(), "Sanity"); return _n_gens; --- 366,392 ---- // Return "true" if all generations have reached the // maximal committed limit that they can reach, without a garbage // collection. virtual bool is_maximal_no_gc() const; ! // Return the generation before "gen". Generation* prev_gen(Generation* gen) const { int l = gen->level(); ! guarantee(l > 0, "Out of bounds"); ! return _gens[l-1]; } ! // Return the generation after "gen". Generation* next_gen(Generation* gen) const { int l = gen->level() + 1; ! guarantee(l <= _n_gens, "Out of bounds"); ! return _gens[l]; } Generation* get_gen(int i) const { ! guarantee(i >= 0 && i < _n_gens, "Out of bounds"); return _gens[i]; } int n_gens() const { assert(_n_gens == gen_policy()->number_of_generations(), "Sanity"); return _n_gens;
*** 483,495 **** _incremental_collection_failed = false; } // Promotion of obj into gen failed. Try to promote obj to higher // gens in ascending order; return the new location of obj if successful. ! // Otherwise, try expand-and-allocate for obj in each generation starting at ! // gen; return the new location of obj if successful. Otherwise, return NULL. ! oop handle_failed_promotion(Generation* gen, oop obj, size_t obj_size); private: // Accessor for memory state verification support --- 481,493 ---- _incremental_collection_failed = false; } // Promotion of obj into gen failed. Try to promote obj to higher // gens in ascending order; return the new location of obj if successful. ! // Otherwise, try expand-and-allocate for obj in both the young and old ! // generation; return the new location of obj if successful. Otherwise, return NULL. ! oop handle_failed_promotion(Generation* old_gen, oop obj, size_t obj_size); private: // Accessor for memory state verification support
src/share/vm/memory/genCollectedHeap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File