7179383: MaxDirectMemorySize argument parsing is broken for values >2G

Change hotspot flag to be unsigned

Reviewed-by: dholmes, sla, fparain, brutisso
This commit is contained in:
Chris Dennis 2012-07-03 01:41:29 -04:00 committed by David Holmes
parent 135f315eaa
commit d1080de4ee
3 changed files with 19 additions and 4 deletions

View file

@ -2709,6 +2709,17 @@ SOLARIS_ONLY(
return JNI_EINVAL;
}
FLAG_SET_CMDLINE(uintx, ConcGCThreads, conc_threads);
} else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
julong max_direct_memory_size = 0;
ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
if (errcode != arg_in_range) {
jio_fprintf(defaultStream::error_stream(),
"Invalid maximum direct memory size: %s\n",
option->optionString);
describe_range_error(errcode);
return JNI_EINVAL;
}
FLAG_SET_CMDLINE(uintx, MaxDirectMemorySize, max_direct_memory_size);
} else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
// Skip -XX:Flags= since that case has already been handled
if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {