| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/sys_info.h" | 5 #include "base/sys_info.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 8 #include <string.h> | 10 #include <string.h> |
| 9 #include <sys/param.h> | 11 #include <sys/param.h> |
| 10 #include <sys/resource.h> | 12 #include <sys/resource.h> |
| 11 #include <sys/utsname.h> | 13 #include <sys/utsname.h> |
| 12 #include <unistd.h> | 14 #include <unistd.h> |
| 13 | 15 |
| 14 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
| 15 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
| 16 #include "base/logging.h" | 18 #include "base/logging.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/sys_info_internal.h" | 20 #include "base/sys_info_internal.h" |
| 19 #include "base/threading/thread_restrictions.h" | 21 #include "base/threading/thread_restrictions.h" |
| 22 #include "build/build_config.h" |
| 20 | 23 |
| 21 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
| 22 #include <sys/vfs.h> | 25 #include <sys/vfs.h> |
| 23 #define statvfs statfs // Android uses a statvfs-like statfs struct and call. | 26 #define statvfs statfs // Android uses a statvfs-like statfs struct and call. |
| 24 #else | 27 #else |
| 25 #include <sys/statvfs.h> | 28 #include <sys/statvfs.h> |
| 26 #endif | 29 #endif |
| 27 | 30 |
| 28 namespace { | 31 namespace { |
| 29 | 32 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 137 } |
| 135 return arch; | 138 return arch; |
| 136 } | 139 } |
| 137 | 140 |
| 138 // static | 141 // static |
| 139 size_t SysInfo::VMAllocationGranularity() { | 142 size_t SysInfo::VMAllocationGranularity() { |
| 140 return getpagesize(); | 143 return getpagesize(); |
| 141 } | 144 } |
| 142 | 145 |
| 143 } // namespace base | 146 } // namespace base |
| OLD | NEW |