Skip to content

Commit

Permalink
VM startup: fatal error: FLAG_SET_ERGO cannot be used to set an inval…
Browse files Browse the repository at this point in the history
…id value for NonNMethodCodeHeapSize
  • Loading branch information
RealLucy committed Jun 20, 2024
1 parent 01ee424 commit 53f32a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hotspot/share/code/codeCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ void CodeCache::initialize_heaps() {

if (!non_nmethod.set) {
non_nmethod.size += compiler_buffer_size;
// Further down, just before FLAG_SET_ERGO(), all segment sizes are
// aligned down to the next lower multiple of min_size. For large page
// sizes, this may result in (non_nmethod.size == 0) which is not acceptable.
// Therefore, force non_nmethod.size to at least min_size.
non_nmethod.size = MAX2(non_nmethod.size, min_size);
}

if (!profiled.set && !non_profiled.set) {
Expand Down

0 comments on commit 53f32a1

Please sign in to comment.