8325882: Serial: Move is_maximal_no_gc to TenuredGeneration
Reviewed-by: stefank
This commit is contained in:
parent
0e2fdc95ae
commit
b718ae35a8
@ -201,9 +201,6 @@ class DefNewGeneration: public Generation {
|
||||
// Return true if the expansion was successful.
|
||||
bool expand(size_t bytes);
|
||||
|
||||
// DefNewGeneration cannot currently expand except at
|
||||
// a GC.
|
||||
virtual bool is_maximal_no_gc() const { return true; }
|
||||
|
||||
// Iteration
|
||||
void object_iterate(ObjectClosure* blk);
|
||||
|
@ -105,12 +105,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;
|
||||
|
||||
// Returns true if this generation cannot be expanded further
|
||||
// without a GC. Override as appropriate.
|
||||
virtual bool is_maximal_no_gc() const {
|
||||
return _virtual_space.uncommitted_size() == 0;
|
||||
}
|
||||
|
||||
MemRegion reserved() const { return _reserved; }
|
||||
|
||||
/* Returns "TRUE" iff "p" points into the reserved area of the generation. */
|
||||
|
@ -963,7 +963,8 @@ void SerialHeap::generation_iterate(GenClosure* cl,
|
||||
}
|
||||
|
||||
bool SerialHeap::is_maximal_no_gc() const {
|
||||
return _young_gen->is_maximal_no_gc() && _old_gen->is_maximal_no_gc();
|
||||
// We don't expand young-gen except at a GC.
|
||||
return _old_gen->is_maximal_no_gc();
|
||||
}
|
||||
|
||||
void SerialHeap::save_marks() {
|
||||
|
@ -98,6 +98,12 @@ class TenuredGeneration: public Generation {
|
||||
MemRegion prev_used_region() const { return _prev_used_region; }
|
||||
void save_used_region() { _prev_used_region = used_region(); }
|
||||
|
||||
// Returns true if this generation cannot be expanded further
|
||||
// without a GC.
|
||||
bool is_maximal_no_gc() const {
|
||||
return _virtual_space.uncommitted_size() == 0;
|
||||
}
|
||||
|
||||
HeapWord* block_start(const void* p) const;
|
||||
|
||||
void scan_old_to_young_refs();
|
||||
|
Loading…
Reference in New Issue
Block a user