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 RUNTIME_VM_OS_H_ | 5 #ifndef RUNTIME_VM_OS_H_ |
6 #define RUNTIME_VM_OS_H_ | 6 #define RUNTIME_VM_OS_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 | 9 |
10 // Forward declarations. | 10 // Forward declarations. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // preferred code alignment on all platforms. | 72 // preferred code alignment on all platforms. |
73 static const int kMaxPreferredCodeAlignment = 32; | 73 static const int kMaxPreferredCodeAlignment = 32; |
74 | 74 |
75 // Returns the preferred code alignment or zero if | 75 // Returns the preferred code alignment or zero if |
76 // the platform doesn't care. Guaranteed to be a power of two. | 76 // the platform doesn't care. Guaranteed to be a power of two. |
77 static intptr_t PreferredCodeAlignment(); | 77 static intptr_t PreferredCodeAlignment(); |
78 | 78 |
79 // Returns number of available processor cores. | 79 // Returns number of available processor cores. |
80 static int NumberOfAvailableProcessors(); | 80 static int NumberOfAvailableProcessors(); |
81 | 81 |
82 // Returns the maximium resident set size of this process. | |
83 static uintptr_t MaxRSS(); | |
84 | |
85 // Sleep the currently executing thread for millis ms. | 82 // Sleep the currently executing thread for millis ms. |
86 static void Sleep(int64_t millis); | 83 static void Sleep(int64_t millis); |
87 | 84 |
88 // Sleep the currently executing thread for micros microseconds. | 85 // Sleep the currently executing thread for micros microseconds. |
89 static void SleepMicros(int64_t micros); | 86 static void SleepMicros(int64_t micros); |
90 | 87 |
91 // Debug break. | 88 // Debug break. |
92 static void DebugBreak(); | 89 static void DebugBreak(); |
93 | 90 |
94 // Returns the current program counter. | 91 // Returns the current program counter. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 static void Shutdown(); | 144 static void Shutdown(); |
148 | 145 |
149 static void Abort(); | 146 static void Abort(); |
150 | 147 |
151 static void Exit(int code); | 148 static void Exit(int code); |
152 }; | 149 }; |
153 | 150 |
154 } // namespace dart | 151 } // namespace dart |
155 | 152 |
156 #endif // RUNTIME_VM_OS_H_ | 153 #endif // RUNTIME_VM_OS_H_ |
OLD | NEW |