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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 if (!LoadDbgHelpAndTlHelp32()) return; | 1201 if (!LoadDbgHelpAndTlHelp32()) return; |
1202 HANDLE process_handle = GetCurrentProcess(); | 1202 HANDLE process_handle = GetCurrentProcess(); |
1203 LoadSymbols(isolate, process_handle); | 1203 LoadSymbols(isolate, process_handle); |
1204 } | 1204 } |
1205 | 1205 |
1206 | 1206 |
1207 void OS::SignalCodeMovingGC() { | 1207 void OS::SignalCodeMovingGC() { |
1208 } | 1208 } |
1209 | 1209 |
1210 | 1210 |
| 1211 uintptr_t OS::TotalPhysicalMemory() { |
| 1212 MEMORYSTATUSEX memory_info; |
| 1213 memory_info.dwLength = sizeof(memory_info); |
| 1214 if (!GlobalMemoryStatusEx(&memory_info)) { |
| 1215 UNREACHABLE(); |
| 1216 return 0; |
| 1217 } |
| 1218 |
| 1219 return static_cast<uintptr_t>(memory_info.ullTotalPhys); |
| 1220 } |
| 1221 |
| 1222 |
1211 #else // __MINGW32__ | 1223 #else // __MINGW32__ |
1212 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } | 1224 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } |
1213 void OS::SignalCodeMovingGC() { } | 1225 void OS::SignalCodeMovingGC() { } |
1214 #endif // __MINGW32__ | 1226 #endif // __MINGW32__ |
1215 | 1227 |
1216 | 1228 |
1217 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 1229 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
1218 return 0; // Windows runs on anything. | 1230 return 0; // Windows runs on anything. |
1219 } | 1231 } |
1220 | 1232 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 ASSERT(result); | 1457 ASSERT(result); |
1446 } | 1458 } |
1447 | 1459 |
1448 | 1460 |
1449 | 1461 |
1450 void Thread::YieldCPU() { | 1462 void Thread::YieldCPU() { |
1451 Sleep(0); | 1463 Sleep(0); |
1452 } | 1464 } |
1453 | 1465 |
1454 } } // namespace v8::internal | 1466 } } // namespace v8::internal |
OLD | NEW |