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

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

Issue 513923005: More PNaCL fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/base/platform/semaphore.cc ('k') | src/d8-posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/sys-info.cc
diff --git a/src/base/sys-info.cc b/src/base/sys-info.cc
index 203b777bee0e24070b47f16911e1b934a00084d8..06c4f24eebf3f7c9f0a43697486db601af3c6b7b 100644
--- a/src/base/sys-info.cc
+++ b/src/base/sys-info.cc
@@ -91,6 +91,9 @@ int64_t SysInfo::AmountOfPhysicalMemory() {
return 0;
}
return static_cast<int64_t>(stat_buf.st_size);
+#elif V8_OS_NACL
+ // No support for _SC_PHYS_PAGES, assume 2GB.
+ return static_cast<int64_t>(1) << 31;
#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/semaphore.cc ('k') | src/d8-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698