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

Unified Diff: src/platform-win32.cc

Issue 24989003: Re-land "Add methods to enable configuration of ResourceConstraints based on limits derived at..." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reland original CL. 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
« no previous file with comments | « src/platform-posix.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index 41a4f1450c9351d1a92d1b23f4e9c3e4a93be9de..3283dfa0ec0aae4de64bcbe9513d98eba0d6db4c 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -1271,6 +1271,18 @@ void OS::SignalCodeMovingGC() {
}
+uint64_t OS::TotalPhysicalMemory() {
+ MEMORYSTATUSEX memory_info;
+ memory_info.dwLength = sizeof(memory_info);
+ if (!GlobalMemoryStatusEx(&memory_info)) {
+ UNREACHABLE();
+ return 0;
+ }
+
+ return static_cast<uint64_t>(memory_info.ullTotalPhys);
+}
+
+
#else // __MINGW32__
void OS::LogSharedLibraryAddresses(Isolate* isolate) { }
void OS::SignalCodeMovingGC() { }
« no previous file with comments | « src/platform-posix.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698