diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index acf7e239103..715b82fd38d 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -533,11 +533,6 @@ size_t DefNewGeneration::capacity_before_gc() const { return eden()->capacity(); } -size_t DefNewGeneration::contiguous_available() const { - return eden()->free(); -} - - void DefNewGeneration::object_iterate(ObjectClosure* blk) { eden()->object_iterate(blk); from()->object_iterate(blk); diff --git a/src/hotspot/share/gc/serial/defNewGeneration.hpp b/src/hotspot/share/gc/serial/defNewGeneration.hpp index a7ee555902a..011b79fdabd 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.hpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.hpp @@ -172,8 +172,6 @@ class DefNewGeneration: public Generation { // 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; } size_t max_survivor_size() const { return _max_survivor_size; } diff --git a/src/hotspot/share/gc/serial/generation.hpp b/src/hotspot/share/gc/serial/generation.hpp index 5e5aad5d0c1..a757c97c5cb 100644 --- a/src/hotspot/share/gc/serial/generation.hpp +++ b/src/hotspot/share/gc/serial/generation.hpp @@ -96,10 +96,6 @@ class Generation: public CHeapObj { // for the allocation of objects. virtual size_t max_capacity() const; - // The largest number of contiguous free bytes in the generation, - // including expansion (Assumes called at a safepoint.) - virtual size_t contiguous_available() const = 0; - MemRegion reserved() const { return _reserved; } /* Returns "TRUE" iff "p" points into the reserved area of the generation. */ diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.cpp b/src/hotspot/share/gc/serial/tenuredGeneration.cpp index f1389b48557..b1b75070947 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.cpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.cpp @@ -377,7 +377,7 @@ void TenuredGeneration::update_counters() { } bool TenuredGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const { - size_t available = contiguous_available(); + size_t available = _the_space->free() + _virtual_space.uncommitted_size(); size_t av_promo = (size_t)_avg_promoted->padded_average(); bool res = (available >= av_promo) || (available >= max_promotion_in_bytes); @@ -413,10 +413,6 @@ TenuredGeneration::expand_and_allocate(size_t word_size, bool is_tlab) { return allocate(word_size, is_tlab); } -size_t TenuredGeneration::contiguous_available() const { - return _the_space->free() + _virtual_space.uncommitted_size(); -} - void TenuredGeneration::assert_correct_size_change_locking() { assert_locked_or_safepoint(Heap_lock); } diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.hpp index bcb2d668213..dcec912d488 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.hpp @@ -124,8 +124,6 @@ public: const char* name() const { return "tenured generation"; } const char* short_name() const { return "Tenured"; } - size_t contiguous_available() const; - // Iteration void object_iterate(ObjectClosure* blk);