Index: src/platform-win32.cc |
diff --git a/src/platform-win32.cc b/src/platform-win32.cc |
index 073b21a011aae732b7db5dc15ca3b18c85e3858b..38720513bc8e8a31034d0e1a606f99ff53488ea0 100644 |
--- a/src/platform-win32.cc |
+++ b/src/platform-win32.cc |
@@ -1208,6 +1208,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() { } |