src/share/vm/memory/defNewGeneration.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/memory/defNewGeneration.cpp
src/share/vm/memory/defNewGeneration.cpp
Print this page
*** 202,212 ****
vm_exit_during_initialization("Could not allocate a new gen space");
// Compute the maximum eden and survivor space sizes. These sizes
// are computed assuming the entire reserved space is committed.
// These values are exported as performance counters.
! uintx alignment = GenCollectedHeap::heap()->collector_policy()->min_alignment();
uintx size = _virtual_space.reserved_size();
_max_survivor_size = compute_survivor_size(size, alignment);
_max_eden_size = size - (2*_max_survivor_size);
// allocate the performance counters
--- 202,212 ----
vm_exit_during_initialization("Could not allocate a new gen space");
// Compute the maximum eden and survivor space sizes. These sizes
// are computed assuming the entire reserved space is committed.
// These values are exported as performance counters.
! uintx alignment = GenCollectedHeap::heap()->collector_policy()->space_alignment();
uintx size = _virtual_space.reserved_size();
_max_survivor_size = compute_survivor_size(size, alignment);
_max_eden_size = size - (2*_max_survivor_size);
// allocate the performance counters
*** 233,243 ****
void DefNewGeneration::compute_space_boundaries(uintx minimum_eden_size,
bool clear_space,
bool mangle_space) {
uintx alignment =
! GenCollectedHeap::heap()->collector_policy()->min_alignment();
// If the spaces are being cleared (only done at heap initialization
// currently), the survivor spaces need not be empty.
// Otherwise, no care is taken for used areas in the survivor spaces
// so check.
--- 233,243 ----
void DefNewGeneration::compute_space_boundaries(uintx minimum_eden_size,
bool clear_space,
bool mangle_space) {
uintx alignment =
! GenCollectedHeap::heap()->collector_policy()->space_alignment();
// If the spaces are being cleared (only done at heap initialization
// currently), the survivor spaces need not be empty.
// Otherwise, no care is taken for used areas in the survivor spaces
// so check.
*** 471,481 ****
return eden()->free()
+ from()->free(); // to() is only used during scavenge
}
size_t DefNewGeneration::max_capacity() const {
! const size_t alignment = GenCollectedHeap::heap()->collector_policy()->min_alignment();
const size_t reserved_bytes = reserved().byte_size();
return reserved_bytes - compute_survivor_size(reserved_bytes, alignment);
}
size_t DefNewGeneration::unsafe_max_alloc_nogc() const {
--- 471,481 ----
return eden()->free()
+ from()->free(); // to() is only used during scavenge
}
size_t DefNewGeneration::max_capacity() const {
! const size_t alignment = GenCollectedHeap::heap()->collector_policy()->space_alignment();
const size_t reserved_bytes = reserved().byte_size();
return reserved_bytes - compute_survivor_size(reserved_bytes, alignment);
}
size_t DefNewGeneration::unsafe_max_alloc_nogc() const {
src/share/vm/memory/defNewGeneration.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File