< prev index next >
src/hotspot/share/gc/shared/collectorPolicy.cpp
Print this page
*** 48,60 ****
CollectorPolicy::CollectorPolicy() :
_space_alignment(0),
_heap_alignment(0),
_initial_heap_byte_size(InitialHeapSize),
_max_heap_byte_size(MaxHeapSize),
! _min_heap_byte_size(Arguments::min_heap_size()),
! _should_clear_all_soft_refs(false),
! _all_soft_refs_clear(false)
{}
#ifdef ASSERT
void CollectorPolicy::assert_flags() {
assert(InitialHeapSize <= MaxHeapSize, "Ergonomics decided on incompatible initial and maximum heap sizes");
--- 48,58 ----
CollectorPolicy::CollectorPolicy() :
_space_alignment(0),
_heap_alignment(0),
_initial_heap_byte_size(InitialHeapSize),
_max_heap_byte_size(MaxHeapSize),
! _min_heap_byte_size(Arguments::min_heap_size())
{}
#ifdef ASSERT
void CollectorPolicy::assert_flags() {
assert(InitialHeapSize <= MaxHeapSize, "Ergonomics decided on incompatible initial and maximum heap sizes");
*** 143,162 ****
_min_heap_byte_size, _initial_heap_byte_size, _max_heap_byte_size);
DEBUG_ONLY(CollectorPolicy::assert_size_info();)
}
- bool CollectorPolicy::use_should_clear_all_soft_refs(bool v) {
- bool result = _should_clear_all_soft_refs;
- set_should_clear_all_soft_refs(false);
- return result;
- }
-
- void CollectorPolicy::cleared_all_soft_refs() {
- _all_soft_refs_clear = true;
- }
-
size_t CollectorPolicy::compute_heap_alignment() {
// The card marking array and the offset arrays for old generations are
// committed in os pages as well. Make sure they are entirely full (to
// avoid partial page problems), e.g. if 512 bytes heap corresponds to 1
// byte entry and the os page size is 4096, the maximum heap size should
--- 141,150 ----
*** 208,228 ****
init_survivor_size,
max_gc_pause_sec,
GCTimeRatio);
}
- void GenCollectorPolicy::cleared_all_soft_refs() {
- // If near gc overhear limit, continue to clear SoftRefs. SoftRefs may
- // have been cleared in the last collection but if the gc overhear
- // limit continues to be near, SoftRefs should still be cleared.
- if (size_policy() != NULL) {
- _should_clear_all_soft_refs = size_policy()->gc_overhead_limit_near();
- }
-
- CollectorPolicy::cleared_all_soft_refs();
- }
-
size_t GenCollectorPolicy::young_gen_size_lower_bound() {
// The young generation must be aligned and have room for eden + two survivors
return align_up(3 * _space_alignment, _gen_alignment);
}
--- 196,205 ----
< prev index next >