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() { } |