mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
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:
parent
6b12e05140
commit
962008f22b
22 changed files with 363 additions and 42 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue