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

Unified Diff: src/base/sys-info.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/base/sys-info.cc
diff --git a/src/base/sys-info.cc b/src/base/sys-info.cc
index c665771b8b73c49d93bb44a20aa916560fa3d78c..617a88ea818c969865082d779be86fcbbef06153 100644
--- a/src/base/sys-info.cc
+++ b/src/base/sys-info.cc
@@ -88,6 +88,9 @@ int64_t SysInfo::AmountOfPhysicalMemory() {
#elif V8_OS_NACL
// No support for _SC_PHYS_PAGES, assume 2GB.
return static_cast<int64_t>(1) << 31;
+#elif V8_OS_AIX
+ int64_t result = sysconf(_SC_AIX_REALMEM);
+ return static_cast<int64_t>(result) * 1024L;
#elif V8_OS_POSIX
long pages = sysconf(_SC_PHYS_PAGES); // NOLINT(runtime/int)
long page_size = sysconf(_SC_PAGESIZE); // NOLINT(runtime/int)
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/code-stubs.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698