Querying for system information from Solaris */
| 4915 | |
| 4916 | /** Querying for system information from Solaris */ |
| 4917 | bool SystemInformationImplementation::QuerySolarisMemory() |
| 4918 | { |
| 4919 | #if defined(__SVR4) && defined(__sun) |
| 4920 | // Solaris allows querying this value by sysconf, but if this is |
| 4921 | // a 32 bit process on a 64 bit host the returned memory will be |
| 4922 | // limited to 4GiB. So if this is a 32 bit process or if the sysconf |
| 4923 | // method fails use the kstat interface. |
| 4924 | # if SIZEOF_VOID_P == 8 |
| 4925 | if (this->QueryMemoryBySysconf()) { |
| 4926 | return true; |
| 4927 | } |
| 4928 | # endif |
| 4929 | |
| 4930 | char* tail; |
| 4931 | unsigned long totalMemory = |
| 4932 | strtoul(this->ParseValueFromKStat("-s physmem").c_str(), &tail, 0); |
| 4933 | this->TotalPhysicalMemory = totalMemory / 128; |
| 4934 | |
| 4935 | return true; |
| 4936 | #else |
| 4937 | return false; |
| 4938 | #endif |
| 4939 | } |
| 4940 | |
| 4941 | bool SystemInformationImplementation::QuerySolarisProcessor() |
| 4942 | { |
no test coverage detected