| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // Avoid using this. Use base/cpu.h to get information about the CPU instead. | 86 // Avoid using this. Use base/cpu.h to get information about the CPU instead. |
| 87 // http://crbug.com/148884 | 87 // http://crbug.com/148884 |
| 88 // Returns the CPU model name of the system. If it can not be figured out, | 88 // Returns the CPU model name of the system. If it can not be figured out, |
| 89 // an empty string is returned. | 89 // an empty string is returned. |
| 90 static std::string CPUModelName(); | 90 static std::string CPUModelName(); |
| 91 | 91 |
| 92 // Return the smallest amount of memory (in bytes) which the VM system will | 92 // Return the smallest amount of memory (in bytes) which the VM system will |
| 93 // allocate. | 93 // allocate. |
| 94 static size_t VMAllocationGranularity(); | 94 static size_t VMAllocationGranularity(); |
| 95 | 95 |
| 96 #if defined(OS_POSIX) && !defined(OS_MACOSX) | |
| 97 // Returns the maximum SysV shared memory segment size, or zero if there is no | |
| 98 // limit. | |
| 99 static uint64_t MaxSharedMemorySize(); | |
| 100 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | |
| 101 | |
| 102 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
| 103 typedef std::map<std::string, std::string> LsbReleaseMap; | 97 typedef std::map<std::string, std::string> LsbReleaseMap; |
| 104 | 98 |
| 105 // Returns the contents of /etc/lsb-release as a map. | 99 // Returns the contents of /etc/lsb-release as a map. |
| 106 static const LsbReleaseMap& GetLsbReleaseMap(); | 100 static const LsbReleaseMap& GetLsbReleaseMap(); |
| 107 | 101 |
| 108 // If |key| is present in the LsbReleaseMap, sets |value| and returns true. | 102 // If |key| is present in the LsbReleaseMap, sets |value| and returns true. |
| 109 static bool GetLsbReleaseValue(const std::string& key, std::string* value); | 103 static bool GetLsbReleaseValue(const std::string& key, std::string* value); |
| 110 | 104 |
| 111 // Convenience function for GetLsbReleaseValue("CHROMEOS_RELEASE_BOARD",...). | 105 // Convenience function for GetLsbReleaseValue("CHROMEOS_RELEASE_BOARD",...). |
| (...skipping 25 matching lines...) Expand all Loading... |
| 137 | 131 |
| 138 // Returns true if this is a low-end device. | 132 // Returns true if this is a low-end device. |
| 139 // Low-end device refers to devices having less than 512M memory in the | 133 // Low-end device refers to devices having less than 512M memory in the |
| 140 // current implementation. | 134 // current implementation. |
| 141 static bool IsLowEndDevice(); | 135 static bool IsLowEndDevice(); |
| 142 }; | 136 }; |
| 143 | 137 |
| 144 } // namespace base | 138 } // namespace base |
| 145 | 139 |
| 146 #endif // BASE_SYS_INFO_H_ | 140 #endif // BASE_SYS_INFO_H_ |
| OLD | NEW |