| 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/os.h" | 5 #include "vm/os.h" |
| 6 | 6 |
| 7 #include <time.h> | 7 #include <time.h> |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Windows 64-bit ABI requires the stack to be 16-byte aligned. | 99 // Windows 64-bit ABI requires the stack to be 16-byte aligned. |
| 100 return 16; | 100 return 16; |
| 101 #else | 101 #else |
| 102 // No requirements on Win32. | 102 // No requirements on Win32. |
| 103 return 0; | 103 return 0; |
| 104 #endif | 104 #endif |
| 105 } | 105 } |
| 106 | 106 |
| 107 | 107 |
| 108 word OS::PreferredCodeAlignment() { | 108 word OS::PreferredCodeAlignment() { |
| 109 ASSERT(16 <= OS::kMaxPreferredCodeAlignment); |
| 109 return 16; | 110 return 16; |
| 110 } | 111 } |
| 111 | 112 |
| 112 | 113 |
| 113 uword OS::GetStackSizeLimit() { | 114 uword OS::GetStackSizeLimit() { |
| 114 // TODO(ager): Can you programatically determine the actual stack | 115 // TODO(ager): Can you programatically determine the actual stack |
| 115 // size limit on Windows? The 2MB limit is set at link time. Maybe | 116 // size limit on Windows? The 2MB limit is set at link time. Maybe |
| 116 // that value should be propagated here? | 117 // that value should be propagated here? |
| 117 return 2 * MB; | 118 return 2 * MB; |
| 118 } | 119 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 void OS::Abort() { | 233 void OS::Abort() { |
| 233 abort(); | 234 abort(); |
| 234 } | 235 } |
| 235 | 236 |
| 236 | 237 |
| 237 void OS::Exit(int code) { | 238 void OS::Exit(int code) { |
| 238 exit(code); | 239 exit(code); |
| 239 } | 240 } |
| 240 | 241 |
| 241 } // namespace dart | 242 } // namespace dart |
| OLD | NEW |