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

Unified Diff: src/platform-solaris.cc

Issue 24269003: Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Move device-specific defaults into ConfigureResourceConstraintsForCurrentPlatform Created 7 years, 3 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/platform-solaris.cc
diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc
index df81c3a6bc87fc82042eb45138afeafe570f19d0..6d8140386352219677cde2d6e981ff5466a93703 100644
--- a/src/platform-solaris.cc
+++ b/src/platform-solaris.cc
@@ -173,6 +173,17 @@ void OS::SignalCodeMovingGC() {
}
+uintptr_t OS::TotalPhysicalMemory() {
+ intptr_t pages = sysconf(_SC_PHYS_PAGES);
+ intptr_t page_size = sysconf(_SC_PAGESIZE);
+ if (pages == -1 || page_size == -1) {
+ UNREACHABLE();
+ return 0;
+ }
+ return static_cast<uintptr_t>(pages) * page_size;
+}
+
+
struct StackWalker {
Vector<OS::StackFrame>& frames;
int index;
« src/heap.cc ('K') | « src/platform-openbsd.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698