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 |
82 // Sleep the currently executing thread for millis ms. | 85 // Sleep the currently executing thread for millis ms. |
83 static void Sleep(int64_t millis); | 86 static void Sleep(int64_t millis); |
84 | 87 |
85 // Sleep the currently executing thread for micros microseconds. | 88 // Sleep the currently executing thread for micros microseconds. |
86 static void SleepMicros(int64_t micros); | 89 static void SleepMicros(int64_t micros); |
87 | 90 |
88 // Debug break. | 91 // Debug break. |
89 static void DebugBreak(); | 92 static void DebugBreak(); |
90 | 93 |
91 // Returns the current program counter. | 94 // Returns the current program counter. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 static void Shutdown(); | 147 static void Shutdown(); |
145 | 148 |
146 static void Abort(); | 149 static void Abort(); |
147 | 150 |
148 static void Exit(int code); | 151 static void Exit(int code); |
149 }; | 152 }; |
150 | 153 |
151 } // namespace dart | 154 } // namespace dart |
152 | 155 |
153 #endif // RUNTIME_VM_OS_H_ | 156 #endif // RUNTIME_VM_OS_H_ |
OLD | NEW |