OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_SYS_INFO_H_ | 5 #ifndef BASE_SYS_INFO_H_ |
6 #define BASE_SYS_INFO_H_ | 6 #define BASE_SYS_INFO_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // an empty string is returned. | 87 // an empty string is returned. |
88 static std::string CPUModelName(); | 88 static std::string CPUModelName(); |
89 | 89 |
90 // Return the smallest amount of memory (in bytes) which the VM system will | 90 // Return the smallest amount of memory (in bytes) which the VM system will |
91 // allocate. | 91 // allocate. |
92 static size_t VMAllocationGranularity(); | 92 static size_t VMAllocationGranularity(); |
93 | 93 |
94 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 94 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
95 // Returns the maximum SysV shared memory segment size, or zero if there is no | 95 // Returns the maximum SysV shared memory segment size, or zero if there is no |
96 // limit. | 96 // limit. |
97 static size_t MaxSharedMemorySize(); | 97 static uint64 MaxSharedMemorySize(); |
98 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 98 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
99 | 99 |
100 #if defined(OS_CHROMEOS) | 100 #if defined(OS_CHROMEOS) |
101 typedef std::map<std::string, std::string> LsbReleaseMap; | 101 typedef std::map<std::string, std::string> LsbReleaseMap; |
102 | 102 |
103 // Returns the contents of /etc/lsb-release as a map. | 103 // Returns the contents of /etc/lsb-release as a map. |
104 static const LsbReleaseMap& GetLsbReleaseMap(); | 104 static const LsbReleaseMap& GetLsbReleaseMap(); |
105 | 105 |
106 // If |key| is present in the LsbReleaseMap, sets |value| and returns true. | 106 // If |key| is present in the LsbReleaseMap, sets |value| and returns true. |
107 static bool GetLsbReleaseValue(const std::string& key, std::string* value); | 107 static bool GetLsbReleaseValue(const std::string& key, std::string* value); |
(...skipping 30 matching lines...) Expand all Loading... |
138 | 138 |
139 // Returns true if this is a low-end device. | 139 // Returns true if this is a low-end device. |
140 // Low-end device refers to devices having less than 512M memory in the | 140 // Low-end device refers to devices having less than 512M memory in the |
141 // current implementation. | 141 // current implementation. |
142 static bool IsLowEndDevice(); | 142 static bool IsLowEndDevice(); |
143 }; | 143 }; |
144 | 144 |
145 } // namespace base | 145 } // namespace base |
146 | 146 |
147 #endif // BASE_SYS_INFO_H_ | 147 #endif // BASE_SYS_INFO_H_ |
OLD | NEW |