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(HOST_OS_WINDOWS) | 6 #if defined(HOST_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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC) | 209 defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC) |
210 return 32; | 210 return 32; |
211 #elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) | 211 #elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) |
212 return 16; | 212 return 16; |
213 #else | 213 #else |
214 #error Unsupported architecture. | 214 #error Unsupported architecture. |
215 #endif | 215 #endif |
216 } | 216 } |
217 | 217 |
218 | 218 |
219 bool OS::AllowStackFrameIteratorFromAnotherThread() { | |
220 return true; | |
221 } | |
222 | |
223 | |
224 int OS::NumberOfAvailableProcessors() { | 219 int OS::NumberOfAvailableProcessors() { |
225 SYSTEM_INFO info; | 220 SYSTEM_INFO info; |
226 GetSystemInfo(&info); | 221 GetSystemInfo(&info); |
227 return info.dwNumberOfProcessors; | 222 return info.dwNumberOfProcessors; |
228 } | 223 } |
229 | 224 |
230 | 225 |
231 uintptr_t OS::MaxRSS() { | 226 uintptr_t OS::MaxRSS() { |
232 PROCESS_MEMORY_COUNTERS pmc; | 227 PROCESS_MEMORY_COUNTERS pmc; |
233 GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc)); | 228 GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc)); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // TODO(zra): Remove once VM shuts down cleanly. | 445 // TODO(zra): Remove once VM shuts down cleanly. |
451 private_flag_windows_run_tls_destructors = false; | 446 private_flag_windows_run_tls_destructors = false; |
452 // On Windows we use ExitProcess so that threads can't clobber the exit_code. | 447 // On Windows we use ExitProcess so that threads can't clobber the exit_code. |
453 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 | 448 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 |
454 ::ExitProcess(code); | 449 ::ExitProcess(code); |
455 } | 450 } |
456 | 451 |
457 } // namespace dart | 452 } // namespace dart |
458 | 453 |
459 #endif // defined(HOST_OS_WINDOWS) | 454 #endif // defined(HOST_OS_WINDOWS) |
OLD | NEW |