src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
Print this page
*** 53,69 ****
static PSAdaptiveSizePolicy* _size_policy;
static PSGCAdaptivePolicyCounters* _gc_policy_counters;
static ParallelScavengeHeap* _psh;
! size_t _young_gen_alignment;
! size_t _old_gen_alignment;
GenerationSizer* _collector_policy;
- inline size_t set_alignment(size_t& var, size_t val);
-
// Collection of generations that are adjacent in the
// space reserved for the heap.
AdjoiningGenerations* _gens;
unsigned int _death_march_count;
--- 53,67 ----
static PSAdaptiveSizePolicy* _size_policy;
static PSGCAdaptivePolicyCounters* _gc_policy_counters;
static ParallelScavengeHeap* _psh;
! // Actual alignment for generation sizes.
! size_t alignment();
GenerationSizer* _collector_policy;
// Collection of generations that are adjacent in the
// space reserved for the heap.
AdjoiningGenerations* _gens;
unsigned int _death_march_count;
*** 78,96 ****
inline bool should_alloc_in_eden(size_t size) const;
inline void death_march_check(HeapWord* const result, size_t size);
HeapWord* mem_allocate_old_gen(size_t size);
public:
! ParallelScavengeHeap() : CollectedHeap() {
! _death_march_count = 0;
! set_alignment(_young_gen_alignment, intra_heap_alignment());
! set_alignment(_old_gen_alignment, intra_heap_alignment());
}
// Return the (conservative) maximum heap alignment
static size_t conservative_max_heap_alignment() {
! return intra_heap_alignment();
}
// For use by VM operations
enum CollectionType {
Scavenge,
--- 76,91 ----
inline bool should_alloc_in_eden(size_t size) const;
inline void death_march_check(HeapWord* const result, size_t size);
HeapWord* mem_allocate_old_gen(size_t size);
public:
! ParallelScavengeHeap() : CollectedHeap(), _death_march_count(0) {
}
// Return the (conservative) maximum heap alignment
static size_t conservative_max_heap_alignment() {
! return GenCollectorPolicy::intra_heap_alignment();
}
// For use by VM operations
enum CollectionType {
Scavenge,
*** 120,135 ****
virtual jint initialize();
void post_initialize();
void update_counters();
// The alignment used for the various generations.
! size_t young_gen_alignment() const { return _young_gen_alignment; }
! size_t old_gen_alignment() const { return _old_gen_alignment; }
// The alignment used for eden and survivors within the young gen
// and for boundary between young gen and old gen.
! static size_t intra_heap_alignment() { return 64 * K * HeapWordSize; }
size_t capacity() const;
size_t used() const;
// Return "true" if all generations have reached the
--- 115,130 ----
virtual jint initialize();
void post_initialize();
void update_counters();
// The alignment used for the various generations.
! size_t young_gen_alignment() { return alignment(); }
! size_t old_gen_alignment() { return alignment(); }
// The alignment used for eden and survivors within the young gen
// and for boundary between young gen and old gen.
! size_t intra_heap_alignment();
size_t capacity() const;
size_t used() const;
// Return "true" if all generations have reached the
*** 261,273 ****
ParStrongRootsScope();
~ParStrongRootsScope();
};
};
- inline size_t ParallelScavengeHeap::set_alignment(size_t& var, size_t val)
- {
- assert(is_power_of_2((intptr_t)val), "must be a power of 2");
- var = round_to(val, intra_heap_alignment());
- return var;
- }
-
#endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARALLELSCAVENGEHEAP_HPP
--- 256,261 ----
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File