| 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 #include "vm/vtune.h" | 9 #include "vm/vtune.h" |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 return p; | 131 return p; |
| 132 } | 132 } |
| 133 | 133 |
| 134 | 134 |
| 135 void OS::AlignedFree(void* ptr) { | 135 void OS::AlignedFree(void* ptr) { |
| 136 _aligned_free(ptr); | 136 _aligned_free(ptr); |
| 137 } | 137 } |
| 138 | 138 |
| 139 | 139 |
| 140 word OS::ActivationFrameAlignment() { | 140 intptr_t OS::ActivationFrameAlignment() { |
| 141 #ifdef _WIN64 | 141 #ifdef _WIN64 |
| 142 // Windows 64-bit ABI requires the stack to be 16-byte aligned. | 142 // Windows 64-bit ABI requires the stack to be 16-byte aligned. |
| 143 return 16; | 143 return 16; |
| 144 #else | 144 #else |
| 145 // No requirements on Win32. | 145 // No requirements on Win32. |
| 146 return 1; | 146 return 1; |
| 147 #endif | 147 #endif |
| 148 } | 148 } |
| 149 | 149 |
| 150 | 150 |
| 151 word OS::PreferredCodeAlignment() { | 151 intptr_t OS::PreferredCodeAlignment() { |
| 152 ASSERT(32 <= OS::kMaxPreferredCodeAlignment); | 152 ASSERT(32 <= OS::kMaxPreferredCodeAlignment); |
| 153 return 32; | 153 return 32; |
| 154 } | 154 } |
| 155 | 155 |
| 156 | 156 |
| 157 uword OS::GetStackSizeLimit() { | |
| 158 // TODO(ager): Can you programatically determine the actual stack | |
| 159 // size limit on Windows? The 2MB limit is set at link time. Maybe | |
| 160 // that value should be propagated here? | |
| 161 return 2 * MB; | |
| 162 } | |
| 163 | |
| 164 | |
| 165 bool OS::AllowStackFrameIteratorFromAnotherThread() { | 157 bool OS::AllowStackFrameIteratorFromAnotherThread() { |
| 166 return true; | 158 return true; |
| 167 } | 159 } |
| 168 | 160 |
| 169 | 161 |
| 170 int OS::NumberOfAvailableProcessors() { | 162 int OS::NumberOfAvailableProcessors() { |
| 171 SYSTEM_INFO info; | 163 SYSTEM_INFO info; |
| 172 GetSystemInfo(&info); | 164 GetSystemInfo(&info); |
| 173 return info.dwNumberOfProcessors; | 165 return info.dwNumberOfProcessors; |
| 174 } | 166 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } | 327 } |
| 336 | 328 |
| 337 | 329 |
| 338 void OS::Exit(int code) { | 330 void OS::Exit(int code) { |
| 339 exit(code); | 331 exit(code); |
| 340 } | 332 } |
| 341 | 333 |
| 342 } // namespace dart | 334 } // namespace dart |
| 343 | 335 |
| 344 #endif // defined(TARGET_OS_WINDOWS) | 336 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |