| 4259 | } |
| 4260 | |
| 4261 | bool SystemInformationImplementation::QueryCygwinMemory() |
| 4262 | { |
| 4263 | #ifdef __CYGWIN__ |
| 4264 | // _SC_PAGE_SIZE does return the mmap() granularity on Cygwin, |
| 4265 | // see https://sourceware.org/legacy-ml/cygwin/2006-06/msg00350.html |
| 4266 | // Therefore just use 4096 as the page size of Windows. |
| 4267 | long m = sysconf(_SC_PHYS_PAGES); |
| 4268 | if (m < 0) { |
| 4269 | return false; |
| 4270 | } |
| 4271 | this->TotalPhysicalMemory = m >> 8; |
| 4272 | return true; |
| 4273 | #else |
| 4274 | return false; |
| 4275 | #endif |
| 4276 | } |
| 4277 | |
| 4278 | bool SystemInformationImplementation::QueryAIXMemory() |
| 4279 | { |