diff --git a/src/hotspot/share/gc/serial/defNewGeneration.hpp b/src/hotspot/share/gc/serial/defNewGeneration.hpp index d6ed965847e..579acd563fd 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.hpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.hpp @@ -174,7 +174,14 @@ class DefNewGeneration: public Generation { size_t free() const; size_t max_capacity() const; size_t capacity_before_gc() const; + + // Return an estimate of the maximum allocation that could be performed + // in the generation without triggering any collection or expansion + // activity. It is "unsafe" because no locks are taken; the result + // should be treated as an approximation, not a guarantee, for use in + // heuristic resizing decisions. size_t unsafe_max_alloc_nogc() const; + size_t contiguous_available() const; size_t max_eden_size() const { return _max_eden_size; } diff --git a/src/hotspot/share/gc/serial/generation.hpp b/src/hotspot/share/gc/serial/generation.hpp index f6a7ffd5abe..385b02ff940 100644 --- a/src/hotspot/share/gc/serial/generation.hpp +++ b/src/hotspot/share/gc/serial/generation.hpp @@ -108,13 +108,6 @@ class Generation: public CHeapObj<mtGC> { // The largest number of contiguous free bytes in this or any higher generation. virtual size_t max_contiguous_available() const; - // Return an estimate of the maximum allocation that could be performed - // in the generation without triggering any collection or expansion - // activity. It is "unsafe" because no locks are taken; the result - // should be treated as an approximation, not a guarantee, for use in - // heuristic resizing decisions. - virtual size_t unsafe_max_alloc_nogc() const = 0; - // Returns true if this generation cannot be expanded further // without a GC. Override as appropriate. virtual bool is_maximal_no_gc() const { diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.cpp b/src/hotspot/share/gc/serial/tenuredGeneration.cpp index 9e625bae531..d4430106db5 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.cpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.cpp @@ -450,10 +450,6 @@ TenuredGeneration::expand_and_allocate(size_t word_size, bool is_tlab) { return _the_space->allocate(word_size); } -size_t TenuredGeneration::unsafe_max_alloc_nogc() const { - return _the_space->free(); -} - size_t TenuredGeneration::contiguous_available() const { return _the_space->free() + _virtual_space.uncommitted_size(); } diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.hpp index 8b57ec8e5de..329e531c1f3 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.hpp @@ -111,7 +111,6 @@ class TenuredGeneration: public Generation { const char* name() const { return "tenured generation"; } const char* short_name() const { return "Tenured"; } - size_t unsafe_max_alloc_nogc() const; size_t contiguous_available() const; // Iteration