8010722: assert: failed: heap size is too big for compressed oops

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
This commit is contained in:
Thomas Schatzl 2013-09-11 16:25:02 +02:00
parent 6b12e05140
commit 962008f22b
22 changed files with 363 additions and 42 deletions

View file

@ -98,6 +98,9 @@ class CollectorPolicy : public CHeapObj<mtGC> {
{}
public:
// Return maximum heap alignment that may be imposed by the policy
static size_t compute_max_alignment();
void set_min_alignment(size_t align) { _min_alignment = align; }
size_t min_alignment() { return _min_alignment; }
void set_max_alignment(size_t align) { _max_alignment = align; }
@ -234,9 +237,6 @@ class GenCollectorPolicy : public CollectorPolicy {
// Try to allocate space by expanding the heap.
virtual HeapWord* expand_heap_and_allocate(size_t size, bool is_tlab);
// compute max heap alignment
size_t compute_max_alignment();
// Scale the base_size by NewRation according to
// result = base_size / (NewRatio + 1)
// and align by min_alignment()