mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
7122219: Passed StringTableSize value not verified
Check that the values specified for -XX:StringTableSize are within a certain range. Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
a988fc0968
commit
a28380d97e
5 changed files with 19 additions and 10 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "precompiled.hpp"
|
||||
#include "classfile/javaAssertions.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "compiler/compilerOracle.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/cardTableRS.hpp"
|
||||
|
@ -1844,6 +1845,11 @@ bool Arguments::check_vm_args_consistency() {
|
|||
status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio");
|
||||
status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio");
|
||||
|
||||
// Divide by bucket size to prevent a large size from causing rollover when
|
||||
// calculating amount of memory needed to be allocated for the String table.
|
||||
status = status && verify_interval(StringTableSize, defaultStringTableSize,
|
||||
(max_uintx / StringTable::bucket_size()), "StringTable size");
|
||||
|
||||
if (MinHeapFreeRatio > MaxHeapFreeRatio) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue