mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44: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
|
@ -872,6 +872,9 @@ jint Universe::initialize_heap() {
|
|||
|
||||
// Reserve the Java heap, which is now the same for all GCs.
|
||||
ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
|
||||
assert(alignment <= Arguments::conservative_max_heap_alignment(),
|
||||
err_msg("actual alignment "SIZE_FORMAT" must be within maximum heap alignment "SIZE_FORMAT,
|
||||
alignment, Arguments::conservative_max_heap_alignment()));
|
||||
size_t total_reserved = align_size_up(heap_size, alignment);
|
||||
assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
|
||||
"heap size is too big for compressed oops");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue