Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: base/process/process_metrics_posix.cc

Issue 2807463004: GN: aix port along with linux_s390x, linux_ppc64 and linux_ppc64le support. (Closed)
Patch Set: removed the changes from //base/BUILD.gn Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/process/process_metrics_linux.cc ('k') | base/process/process_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
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_NETBSD) 36 #elif defined(OS_NETBSD)
37 static const rlim_t kSystemDefaultMaxFds = 1024; 37 static const rlim_t kSystemDefaultMaxFds = 1024;
38 #elif defined(OS_OPENBSD) 38 #elif defined(OS_OPENBSD)
39 static const rlim_t kSystemDefaultMaxFds = 256; 39 static const rlim_t kSystemDefaultMaxFds = 256;
40 #elif defined(OS_ANDROID) 40 #elif defined(OS_ANDROID)
41 static const rlim_t kSystemDefaultMaxFds = 1024; 41 static const rlim_t kSystemDefaultMaxFds = 1024;
42 #elif defined(OS_AIX)
43 static const rlim_t kSystemDefaultMaxFds = 8192;
42 #endif 44 #endif
43 45
44 size_t GetMaxFds() { 46 size_t GetMaxFds() {
45 rlim_t max_fds; 47 rlim_t max_fds;
46 struct rlimit nofile; 48 struct rlimit nofile;
47 if (getrlimit(RLIMIT_NOFILE, &nofile)) { 49 if (getrlimit(RLIMIT_NOFILE, &nofile)) {
48 // getrlimit failed. Take a best guess. 50 // getrlimit failed. Take a best guess.
49 max_fds = kSystemDefaultMaxFds; 51 max_fds = kSystemDefaultMaxFds;
50 RAW_LOG(ERROR, "getrlimit(RLIMIT_NOFILE) failed"); 52 RAW_LOG(ERROR, "getrlimit(RLIMIT_NOFILE) failed");
51 } else { 53 } else {
(...skipping 21 matching lines...) Expand all
73 } else { 75 } else {
74 PLOG(INFO) << "Failed to get file descriptor limit"; 76 PLOG(INFO) << "Failed to get file descriptor limit";
75 } 77 }
76 } 78 }
77 79
78 size_t GetPageSize() { 80 size_t GetPageSize() {
79 return getpagesize(); 81 return getpagesize();
80 } 82 }
81 83
82 } // namespace base 84 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_metrics_linux.cc ('k') | base/process/process_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698