| 5053 | } |
| 5054 | |
| 5055 | bool SystemInformationImplementation::QueryQNXMemory() |
| 5056 | { |
| 5057 | #if defined(__QNX__) |
| 5058 | std::string buffer; |
| 5059 | std::vector<char const*> args; |
| 5060 | args.clear(); |
| 5061 | |
| 5062 | args.push_back("showmem"); |
| 5063 | args.push_back("-S"); |
| 5064 | args.push_back(0); |
| 5065 | buffer = this->RunProcess(args); |
| 5066 | args.clear(); |
| 5067 | |
| 5068 | size_t pos = buffer.find("System RAM:"); |
| 5069 | if (pos == std::string::npos) |
| 5070 | return false; |
| 5071 | pos = buffer.find(":", pos); |
| 5072 | size_t pos2 = buffer.find("M (", pos); |
| 5073 | if (pos2 == std::string::npos) |
| 5074 | return false; |
| 5075 | |
| 5076 | pos++; |
| 5077 | while (buffer[pos] == ' ') |
| 5078 | pos++; |
| 5079 | |
| 5080 | buffer.erase(0, pos); |
| 5081 | buffer.resize(pos2); |
| 5082 | this->TotalPhysicalMemory = atoi(buffer.c_str()); |
| 5083 | return true; |
| 5084 | #endif |
| 5085 | return false; |
| 5086 | } |
| 5087 | |
| 5088 | bool SystemInformationImplementation::QueryBSDMemory() |
| 5089 | { |
no test coverage detected