< prev index next >
src/share/vm/runtime/arguments.cpp
Print this page
@@ -776,12 +776,12 @@
FREE_C_HEAP_ARRAY(char, dbuf);
os::closedir(dir);
return path;
}
-// Parses a memory size specification string.
-static bool atomull(const char *s, julong* result) {
+// Parses a size specification string.
+bool Arguments::atojulong(const char *s, julong* result) {
julong n = 0;
int args_read = 0;
bool is_hex = false;
// Skip leading 0[xX] for hexadecimal
if (*s =='0' && (*(s+1) == 'x' || *(s+1) == 'X')) {
@@ -883,19 +883,19 @@
if (result == NULL) {
return false;
}
- // Check the sign first since atomull() parses only unsigned values.
+ // Check the sign first since atojulong() parses only unsigned values.
if (*value == '-') {
if (!result->is_intx() && !result->is_int()) {
return false;
}
value++;
is_neg = true;
}
- if (!atomull(value, &v)) {
+ if (!Arguments::atojulong(value, &v)) {
return false;
}
if (result->is_int()) {
int_v = (int) v;
if (is_neg) {
@@ -2655,16 +2655,16 @@
bool Arguments::parse_uintx(const char* value,
uintx* uintx_arg,
uintx min_size) {
- // Check the sign first since atomull() parses only unsigned values.
+ // Check the sign first since atojulong() parses only unsigned values.
bool value_is_positive = !(*value == '-');
if (value_is_positive) {
julong n;
- bool good_return = atomull(value, &n);
+ bool good_return = atojulong(value, &n);
if (good_return) {
bool above_minimum = n >= min_size;
bool value_is_too_large = n > max_uintx;
if (above_minimum && !value_is_too_large) {
@@ -2677,11 +2677,11 @@
}
Arguments::ArgsRange Arguments::parse_memory_size(const char* s,
julong* long_arg,
julong min_size) {
- if (!atomull(s, long_arg)) return arg_unreadable;
+ if (!atojulong(s, long_arg)) return arg_unreadable;
return check_memory_size(*long_arg, min_size);
}
// Parse JavaVMInitArgs structure
< prev index next >