| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <malloc.h> // NOLINT | 10 #include <malloc.h> // NOLINT |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 229 } |
| 230 | 230 |
| 231 | 231 |
| 232 int OS::NumberOfAvailableProcessors() { | 232 int OS::NumberOfAvailableProcessors() { |
| 233 SYSTEM_INFO info; | 233 SYSTEM_INFO info; |
| 234 GetSystemInfo(&info); | 234 GetSystemInfo(&info); |
| 235 return info.dwNumberOfProcessors; | 235 return info.dwNumberOfProcessors; |
| 236 } | 236 } |
| 237 | 237 |
| 238 | 238 |
| 239 uinptr_t OS::MaxRSS() { | 239 uintptr_t OS::MaxRSS() { |
| 240 PROCESS_MEMORY_COUNTERS pmc; | 240 PROCESS_MEMORY_COUNTERS pmc; |
| 241 GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc)); | 241 GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc)); |
| 242 return pmc.PeakWorkingSetSize; | 242 return pmc.PeakWorkingSetSize; |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 void OS::Sleep(int64_t millis) { | 246 void OS::Sleep(int64_t millis) { |
| 247 ::Sleep(millis); | 247 ::Sleep(millis); |
| 248 } | 248 } |
| 249 | 249 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 // TODO(zra): Remove once VM shuts down cleanly. | 455 // TODO(zra): Remove once VM shuts down cleanly. |
| 456 private_flag_windows_run_tls_destructors = false; | 456 private_flag_windows_run_tls_destructors = false; |
| 457 // On Windows we use ExitProcess so that threads can't clobber the exit_code. | 457 // On Windows we use ExitProcess so that threads can't clobber the exit_code. |
| 458 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 | 458 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 |
| 459 ::ExitProcess(code); | 459 ::ExitProcess(code); |
| 460 } | 460 } |
| 461 | 461 |
| 462 } // namespace dart | 462 } // namespace dart |
| 463 | 463 |
| 464 #endif // defined(TARGET_OS_WINDOWS) | 464 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |