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_LINUX) | 6 #if defined(HOST_OS_LINUX) |
7 | 7 |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 | 9 |
10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // TODO(5411554): Allow overriding default code alignment for | 226 // TODO(5411554): Allow overriding default code alignment for |
227 // testing purposes. | 227 // testing purposes. |
228 // Flags::DebugIsInt("codealign", &alignment); | 228 // Flags::DebugIsInt("codealign", &alignment); |
229 ASSERT(Utils::IsPowerOfTwo(alignment)); | 229 ASSERT(Utils::IsPowerOfTwo(alignment)); |
230 ASSERT(alignment >= kMinimumAlignment); | 230 ASSERT(alignment >= kMinimumAlignment); |
231 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); | 231 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); |
232 return alignment; | 232 return alignment; |
233 } | 233 } |
234 | 234 |
235 | 235 |
236 bool OS::AllowStackFrameIteratorFromAnotherThread() { | |
237 return false; | |
238 } | |
239 | |
240 | |
241 int OS::NumberOfAvailableProcessors() { | 236 int OS::NumberOfAvailableProcessors() { |
242 return sysconf(_SC_NPROCESSORS_ONLN); | 237 return sysconf(_SC_NPROCESSORS_ONLN); |
243 } | 238 } |
244 | 239 |
245 | 240 |
246 uintptr_t OS::MaxRSS() { | 241 uintptr_t OS::MaxRSS() { |
247 struct rusage usage; | 242 struct rusage usage; |
248 usage.ru_maxrss = 0; | 243 usage.ru_maxrss = 0; |
249 int r = getrusage(RUSAGE_SELF, &usage); | 244 int r = getrusage(RUSAGE_SELF, &usage); |
250 ASSERT(r == 0); | 245 ASSERT(r == 0); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 } | 417 } |
423 | 418 |
424 | 419 |
425 void OS::Exit(int code) { | 420 void OS::Exit(int code) { |
426 exit(code); | 421 exit(code); |
427 } | 422 } |
428 | 423 |
429 } // namespace dart | 424 } // namespace dart |
430 | 425 |
431 #endif // defined(HOST_OS_LINUX) | 426 #endif // defined(HOST_OS_LINUX) |
OLD | NEW |