src/hotspot/os/solaris/os_solaris.cpp
changeset 47903 7f22774a5f42
parent 47881 0ce0ac68ace7
child 48005 9fd89aabb6cd
equal deleted inserted replaced
47896:7092940fbaff 47903:7f22774a5f42
   288   _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) *
   288   _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) *
   289                                      (julong)sysconf(_SC_PAGESIZE);
   289                                      (julong)sysconf(_SC_PAGESIZE);
   290 }
   290 }
   291 
   291 
   292 int os::active_processor_count() {
   292 int os::active_processor_count() {
       
   293   // User has overridden the number of active processors
       
   294   if (ActiveProcessorCount > 0) {
       
   295     log_trace(os)("active_processor_count: "
       
   296                   "active processor count set by user : %d",
       
   297                   ActiveProcessorCount);
       
   298     return ActiveProcessorCount;
       
   299   }
       
   300 
   293   int online_cpus = sysconf(_SC_NPROCESSORS_ONLN);
   301   int online_cpus = sysconf(_SC_NPROCESSORS_ONLN);
   294   pid_t pid = getpid();
   302   pid_t pid = getpid();
   295   psetid_t pset = PS_NONE;
   303   psetid_t pset = PS_NONE;
   296   // Are we running in a processor set or is there any processor set around?
   304   // Are we running in a processor set or is there any processor set around?
   297   if (pset_bind(PS_QUERY, P_PID, pid, &pset) == 0) {
   305   if (pset_bind(PS_QUERY, P_PID, pid, &pset) == 0) {