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(HOST_OS_ANDROID) | 6 #if defined(HOST_OS_ANDROID) |
7 | 7 |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 | 9 |
10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // TODO(5411554): Allow overriding default code alignment for | 218 // TODO(5411554): Allow overriding default code alignment for |
219 // testing purposes. | 219 // testing purposes. |
220 // Flags::DebugIsInt("codealign", &alignment); | 220 // Flags::DebugIsInt("codealign", &alignment); |
221 ASSERT(Utils::IsPowerOfTwo(alignment)); | 221 ASSERT(Utils::IsPowerOfTwo(alignment)); |
222 ASSERT(alignment >= kMinimumAlignment); | 222 ASSERT(alignment >= kMinimumAlignment); |
223 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); | 223 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); |
224 return alignment; | 224 return alignment; |
225 } | 225 } |
226 | 226 |
227 | 227 |
228 bool OS::AllowStackFrameIteratorFromAnotherThread() { | |
229 return false; | |
230 } | |
231 | |
232 | |
233 int OS::NumberOfAvailableProcessors() { | 228 int OS::NumberOfAvailableProcessors() { |
234 return sysconf(_SC_NPROCESSORS_ONLN); | 229 return sysconf(_SC_NPROCESSORS_ONLN); |
235 } | 230 } |
236 | 231 |
237 | 232 |
238 uintptr_t OS::MaxRSS() { | 233 uintptr_t OS::MaxRSS() { |
239 struct rusage usage; | 234 struct rusage usage; |
240 usage.ru_maxrss = 0; | 235 usage.ru_maxrss = 0; |
241 int r = getrusage(RUSAGE_SELF, &usage); | 236 int r = getrusage(RUSAGE_SELF, &usage); |
242 ASSERT(r == 0); | 237 ASSERT(r == 0); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 } | 439 } |
445 | 440 |
446 | 441 |
447 void OS::Exit(int code) { | 442 void OS::Exit(int code) { |
448 exit(code); | 443 exit(code); |
449 } | 444 } |
450 | 445 |
451 } // namespace dart | 446 } // namespace dart |
452 | 447 |
453 #endif // defined(HOST_OS_ANDROID) | 448 #endif // defined(HOST_OS_ANDROID) |
OLD | NEW |