< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page

        

*** 782,792 **** os::closedir(dir); return path; } // Parses a memory size specification string. ! static bool atomull(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')) { --- 782,792 ---- os::closedir(dir); return path; } // Parses a memory size specification string. ! bool Arguments::atomull(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')) {
*** 896,906 **** return false; } value++; is_neg = true; } ! if (!atomull(value, &v)) { return false; } if (result->is_int()) { int_v = (int) v; if (is_neg) { --- 896,906 ---- return false; } value++; is_neg = true; } ! if (!Arguments::atomull(value, &v)) { return false; } if (result->is_int()) { int_v = (int) v; if (is_neg) {
*** 2636,2646 **** // Check the sign first since atomull() parses only unsigned values. bool value_is_positive = !(*value == '-'); if (value_is_positive) { julong n; ! bool good_return = atomull(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) { --- 2636,2646 ---- // Check the sign first since atomull() parses only unsigned values. bool value_is_positive = !(*value == '-'); if (value_is_positive) { julong n; ! bool good_return = Arguments::atomull(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) {
*** 2653,2663 **** } Arguments::ArgsRange Arguments::parse_memory_size(const char* s, julong* long_arg, julong min_size) { ! if (!atomull(s, long_arg)) return arg_unreadable; return check_memory_size(*long_arg, min_size); } // Parse JavaVMInitArgs structure --- 2653,2663 ---- } Arguments::ArgsRange Arguments::parse_memory_size(const char* s, julong* long_arg, julong min_size) { ! if (!Arguments::atomull(s, long_arg)) return arg_unreadable; return check_memory_size(*long_arg, min_size); } // Parse JavaVMInitArgs structure
< prev index next >