| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/process/process_metrics.h" | 5 #include "base/process/process_metrics.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <sys/resource.h> | 10 #include <sys/resource.h> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 ProcessMetrics::~ProcessMetrics() { } | 26 ProcessMetrics::~ProcessMetrics() { } |
| 27 | 27 |
| 28 #if defined(OS_LINUX) | 28 #if defined(OS_LINUX) |
| 29 static const rlim_t kSystemDefaultMaxFds = 8192; | 29 static const rlim_t kSystemDefaultMaxFds = 8192; |
| 30 #elif defined(OS_MACOSX) | 30 #elif defined(OS_MACOSX) |
| 31 static const rlim_t kSystemDefaultMaxFds = 256; | 31 static const rlim_t kSystemDefaultMaxFds = 256; |
| 32 #elif defined(OS_SOLARIS) | 32 #elif defined(OS_SOLARIS) |
| 33 static const rlim_t kSystemDefaultMaxFds = 8192; | 33 static const rlim_t kSystemDefaultMaxFds = 8192; |
| 34 #elif defined(OS_FREEBSD) | 34 #elif defined(OS_FREEBSD) |
| 35 static const rlim_t kSystemDefaultMaxFds = 8192; | 35 static const rlim_t kSystemDefaultMaxFds = 8192; |
| 36 #elif defined(OS_FUCHSIA) |
| 37 static const rlim_t kSystemDefaultMaxFds = 8192; |
| 36 #elif defined(OS_NETBSD) | 38 #elif defined(OS_NETBSD) |
| 37 static const rlim_t kSystemDefaultMaxFds = 1024; | 39 static const rlim_t kSystemDefaultMaxFds = 1024; |
| 38 #elif defined(OS_OPENBSD) | 40 #elif defined(OS_OPENBSD) |
| 39 static const rlim_t kSystemDefaultMaxFds = 256; | 41 static const rlim_t kSystemDefaultMaxFds = 256; |
| 40 #elif defined(OS_ANDROID) | 42 #elif defined(OS_ANDROID) |
| 41 static const rlim_t kSystemDefaultMaxFds = 1024; | 43 static const rlim_t kSystemDefaultMaxFds = 1024; |
| 42 #elif defined(OS_AIX) | 44 #elif defined(OS_AIX) |
| 43 static const rlim_t kSystemDefaultMaxFds = 8192; | 45 static const rlim_t kSystemDefaultMaxFds = 8192; |
| 44 #endif | 46 #endif |
| 45 | 47 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 75 } else { | 77 } else { |
| 76 PLOG(INFO) << "Failed to get file descriptor limit"; | 78 PLOG(INFO) << "Failed to get file descriptor limit"; |
| 77 } | 79 } |
| 78 } | 80 } |
| 79 | 81 |
| 80 size_t GetPageSize() { | 82 size_t GetPageSize() { |
| 81 return getpagesize(); | 83 return getpagesize(); |
| 82 } | 84 } |
| 83 | 85 |
| 84 } // namespace base | 86 } // namespace base |
| OLD | NEW |