src/os/solaris/vm/os_solaris.cpp

changeset 9413
5aa3d728164a
parent 8420
b5c3e9670fa0
child 9417
65409bcab2ad
equal deleted inserted replaced
9412:2bf8498a25ec 9413:5aa3d728164a
355 _processors_online = sysconf (_SC_NPROCESSORS_ONLN); 355 _processors_online = sysconf (_SC_NPROCESSORS_ONLN);
356 _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE); 356 _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE);
357 } 357 }
358 358
359 int os::active_processor_count() { 359 int os::active_processor_count() {
360 // User has overridden the number of active processors
361 if (ActiveProcessorCount > 0) {
362 if (Verbose) {
363 tty->print_cr("active_processor_count: "
364 "active processor count set by user : %d",
365 ActiveProcessorCount);
366 }
367 return ActiveProcessorCount;
368 }
369
360 int online_cpus = sysconf(_SC_NPROCESSORS_ONLN); 370 int online_cpus = sysconf(_SC_NPROCESSORS_ONLN);
361 pid_t pid = getpid(); 371 pid_t pid = getpid();
362 psetid_t pset = PS_NONE; 372 psetid_t pset = PS_NONE;
363 // Are we running in a processor set or is there any processor set around? 373 // Are we running in a processor set or is there any processor set around?
364 if (pset_bind(PS_QUERY, P_PID, pid, &pset) == 0) { 374 if (pset_bind(PS_QUERY, P_PID, pid, &pset) == 0) {

mercurial