src/share/vm/runtime/os.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/os.cpp

Print this page
rev 5826 : 8026849: Fix typos in the GC code, part 2
Summary: Fixed typos in assert messages, flag descriptions and verbose messages
Reviewed-by:


1180   assert(num == 1043618065, "bad seed");
1181   tty->print_cr("mean of the 1st 10000 numbers: %f", mean);
1182   tty->print_cr("variance of the 1st 10000 numbers: %f", variance);
1183   const double eps = 0.0001;
1184   t = fabsd(mean - 0.5018);
1185   assert(t < eps, "bad mean");
1186   t = (variance - 0.3355) < 0.0 ? -(variance - 0.3355) : variance - 0.3355;
1187   assert(t < eps, "bad variance");
1188 }
1189 #endif
1190 
1191 
1192 // Set up the boot classpath.
1193 
1194 char* os::format_boot_path(const char* format_string,
1195                            const char* home,
1196                            int home_len,
1197                            char fileSep,
1198                            char pathSep) {
1199     assert((fileSep == '/' && pathSep == ':') ||
1200            (fileSep == '\\' && pathSep == ';'), "unexpected seperator chars");
1201 
1202     // Scan the format string to determine the length of the actual
1203     // boot classpath, and handle platform dependencies as well.
1204     int formatted_path_len = 0;
1205     const char* p;
1206     for (p = format_string; *p != 0; ++p) {
1207         if (*p == '%') formatted_path_len += home_len - 1;
1208         ++formatted_path_len;
1209     }
1210 
1211     char* formatted_path = NEW_C_HEAP_ARRAY(char, formatted_path_len + 1, mtInternal);
1212     if (formatted_path == NULL) {
1213         return NULL;
1214     }
1215 
1216     // Create boot classpath from format, substituting separator chars and
1217     // java home directory.
1218     char* q = formatted_path;
1219     for (p = format_string; *p != 0; ++p) {
1220         switch (*p) {




1180   assert(num == 1043618065, "bad seed");
1181   tty->print_cr("mean of the 1st 10000 numbers: %f", mean);
1182   tty->print_cr("variance of the 1st 10000 numbers: %f", variance);
1183   const double eps = 0.0001;
1184   t = fabsd(mean - 0.5018);
1185   assert(t < eps, "bad mean");
1186   t = (variance - 0.3355) < 0.0 ? -(variance - 0.3355) : variance - 0.3355;
1187   assert(t < eps, "bad variance");
1188 }
1189 #endif
1190 
1191 
1192 // Set up the boot classpath.
1193 
1194 char* os::format_boot_path(const char* format_string,
1195                            const char* home,
1196                            int home_len,
1197                            char fileSep,
1198                            char pathSep) {
1199     assert((fileSep == '/' && pathSep == ':') ||
1200            (fileSep == '\\' && pathSep == ';'), "unexpected separator chars");
1201 
1202     // Scan the format string to determine the length of the actual
1203     // boot classpath, and handle platform dependencies as well.
1204     int formatted_path_len = 0;
1205     const char* p;
1206     for (p = format_string; *p != 0; ++p) {
1207         if (*p == '%') formatted_path_len += home_len - 1;
1208         ++formatted_path_len;
1209     }
1210 
1211     char* formatted_path = NEW_C_HEAP_ARRAY(char, formatted_path_len + 1, mtInternal);
1212     if (formatted_path == NULL) {
1213         return NULL;
1214     }
1215 
1216     // Create boot classpath from format, substituting separator chars and
1217     // java home directory.
1218     char* q = formatted_path;
1219     for (p = format_string; *p != 0; ++p) {
1220         switch (*p) {


src/share/vm/runtime/os.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File