comparison src/share/vm/memory/collectorPolicy.hpp @ 12233:40136aa2cdb1

8010722: assert: failed: heap size is too big for compressed oops Summary: Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation. Reviewed-by: stefank, dholmes
author tschatzl
date Wed, 11 Sep 2013 16:25:02 +0200
parents 1135141fb97e
children 9b4d0569f2f4
comparison
equal deleted inserted replaced
12230:040895ec3920 12233:40136aa2cdb1
96 _should_clear_all_soft_refs(false), 96 _should_clear_all_soft_refs(false),
97 _all_soft_refs_clear(false) 97 _all_soft_refs_clear(false)
98 {} 98 {}
99 99
100 public: 100 public:
101 // Return maximum heap alignment that may be imposed by the policy
102 static size_t compute_max_alignment();
103
101 void set_min_alignment(size_t align) { _min_alignment = align; } 104 void set_min_alignment(size_t align) { _min_alignment = align; }
102 size_t min_alignment() { return _min_alignment; } 105 size_t min_alignment() { return _min_alignment; }
103 void set_max_alignment(size_t align) { _max_alignment = align; } 106 void set_max_alignment(size_t align) { _max_alignment = align; }
104 size_t max_alignment() { return _max_alignment; } 107 size_t max_alignment() { return _max_alignment; }
105 108
232 void initialize_size_info(); 235 void initialize_size_info();
233 236
234 // Try to allocate space by expanding the heap. 237 // Try to allocate space by expanding the heap.
235 virtual HeapWord* expand_heap_and_allocate(size_t size, bool is_tlab); 238 virtual HeapWord* expand_heap_and_allocate(size_t size, bool is_tlab);
236 239
237 // compute max heap alignment
238 size_t compute_max_alignment();
239
240 // Scale the base_size by NewRation according to 240 // Scale the base_size by NewRation according to
241 // result = base_size / (NewRatio + 1) 241 // result = base_size / (NewRatio + 1)
242 // and align by min_alignment() 242 // and align by min_alignment()
243 size_t scale_by_NewRatio_aligned(size_t base_size); 243 size_t scale_by_NewRatio_aligned(size_t base_size);
244 244