OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 if (!LoadDbgHelpAndTlHelp32()) return; | 1264 if (!LoadDbgHelpAndTlHelp32()) return; |
1265 HANDLE process_handle = GetCurrentProcess(); | 1265 HANDLE process_handle = GetCurrentProcess(); |
1266 LoadSymbols(isolate, process_handle); | 1266 LoadSymbols(isolate, process_handle); |
1267 } | 1267 } |
1268 | 1268 |
1269 | 1269 |
1270 void OS::SignalCodeMovingGC() { | 1270 void OS::SignalCodeMovingGC() { |
1271 } | 1271 } |
1272 | 1272 |
1273 | 1273 |
| 1274 uint64_t OS::TotalPhysicalMemory() { |
| 1275 MEMORYSTATUSEX memory_info; |
| 1276 memory_info.dwLength = sizeof(memory_info); |
| 1277 if (!GlobalMemoryStatusEx(&memory_info)) { |
| 1278 UNREACHABLE(); |
| 1279 return 0; |
| 1280 } |
| 1281 |
| 1282 return static_cast<uint64_t>(memory_info.ullTotalPhys); |
| 1283 } |
| 1284 |
| 1285 |
1274 #else // __MINGW32__ | 1286 #else // __MINGW32__ |
1275 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } | 1287 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } |
1276 void OS::SignalCodeMovingGC() { } | 1288 void OS::SignalCodeMovingGC() { } |
1277 #endif // __MINGW32__ | 1289 #endif // __MINGW32__ |
1278 | 1290 |
1279 | 1291 |
1280 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 1292 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
1281 return 0; // Windows runs on anything. | 1293 return 0; // Windows runs on anything. |
1282 } | 1294 } |
1283 | 1295 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 ASSERT(result); | 1520 ASSERT(result); |
1509 } | 1521 } |
1510 | 1522 |
1511 | 1523 |
1512 | 1524 |
1513 void Thread::YieldCPU() { | 1525 void Thread::YieldCPU() { |
1514 Sleep(0); | 1526 Sleep(0); |
1515 } | 1527 } |
1516 | 1528 |
1517 } } // namespace v8::internal | 1529 } } // namespace v8::internal |
OLD | NEW |