| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_OS_H_ | 5 #ifndef VM_OS_H_ |
| 6 #define VM_OS_H_ | 6 #define VM_OS_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 | 9 |
| 10 // Forward declarations. | 10 // Forward declarations. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // the platform doesn't care. Guaranteed to be a power of two. | 93 // the platform doesn't care. Guaranteed to be a power of two. |
| 94 static intptr_t PreferredCodeAlignment(); | 94 static intptr_t PreferredCodeAlignment(); |
| 95 | 95 |
| 96 // Returns true if StackFrameIterator can be used from an isolate that isn't | 96 // Returns true if StackFrameIterator can be used from an isolate that isn't |
| 97 // the calling thread's current isolate. | 97 // the calling thread's current isolate. |
| 98 static bool AllowStackFrameIteratorFromAnotherThread(); | 98 static bool AllowStackFrameIteratorFromAnotherThread(); |
| 99 | 99 |
| 100 // Returns number of available processor cores. | 100 // Returns number of available processor cores. |
| 101 static int NumberOfAvailableProcessors(); | 101 static int NumberOfAvailableProcessors(); |
| 102 | 102 |
| 103 // Returns the maximium resident set size of this process. |
| 104 static uintptr_t MaxRSS(); |
| 105 |
| 103 // Sleep the currently executing thread for millis ms. | 106 // Sleep the currently executing thread for millis ms. |
| 104 static void Sleep(int64_t millis); | 107 static void Sleep(int64_t millis); |
| 105 | 108 |
| 106 // Sleep the currently executing thread for micros microseconds. | 109 // Sleep the currently executing thread for micros microseconds. |
| 107 static void SleepMicros(int64_t micros); | 110 static void SleepMicros(int64_t micros); |
| 108 | 111 |
| 109 // Debug break. | 112 // Debug break. |
| 110 static void DebugBreak(); | 113 static void DebugBreak(); |
| 111 | 114 |
| 112 // Not all platform support strndup. | 115 // Not all platform support strndup. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 static void Shutdown(); | 167 static void Shutdown(); |
| 165 | 168 |
| 166 static void Abort(); | 169 static void Abort(); |
| 167 | 170 |
| 168 static void Exit(int code); | 171 static void Exit(int code); |
| 169 }; | 172 }; |
| 170 | 173 |
| 171 } // namespace dart | 174 } // namespace dart |
| 172 | 175 |
| 173 #endif // VM_OS_H_ | 176 #endif // VM_OS_H_ |
| OLD | NEW |