| 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_MACOS) | 6 #if defined(HOST_OS_MACOS) |
| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // TODO(5411554): Allow overriding default code alignment for | 204 // TODO(5411554): Allow overriding default code alignment for |
| 205 // testing purposes. | 205 // testing purposes. |
| 206 // Flags::DebugIsInt("codealign", &alignment); | 206 // Flags::DebugIsInt("codealign", &alignment); |
| 207 ASSERT(Utils::IsPowerOfTwo(alignment)); | 207 ASSERT(Utils::IsPowerOfTwo(alignment)); |
| 208 ASSERT(alignment >= kMinimumAlignment); | 208 ASSERT(alignment >= kMinimumAlignment); |
| 209 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); | 209 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); |
| 210 return alignment; | 210 return alignment; |
| 211 } | 211 } |
| 212 | 212 |
| 213 | 213 |
| 214 bool OS::AllowStackFrameIteratorFromAnotherThread() { | |
| 215 return false; | |
| 216 } | |
| 217 | |
| 218 | |
| 219 int OS::NumberOfAvailableProcessors() { | 214 int OS::NumberOfAvailableProcessors() { |
| 220 return sysconf(_SC_NPROCESSORS_ONLN); | 215 return sysconf(_SC_NPROCESSORS_ONLN); |
| 221 } | 216 } |
| 222 | 217 |
| 223 | 218 |
| 224 uintptr_t OS::MaxRSS() { | 219 uintptr_t OS::MaxRSS() { |
| 225 struct rusage usage; | 220 struct rusage usage; |
| 226 usage.ru_maxrss = 0; | 221 usage.ru_maxrss = 0; |
| 227 int r = getrusage(RUSAGE_SELF, &usage); | 222 int r = getrusage(RUSAGE_SELF, &usage); |
| 228 ASSERT(r == 0); | 223 ASSERT(r == 0); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 434 } |
| 440 | 435 |
| 441 | 436 |
| 442 void OS::Exit(int code) { | 437 void OS::Exit(int code) { |
| 443 exit(code); | 438 exit(code); |
| 444 } | 439 } |
| 445 | 440 |
| 446 } // namespace dart | 441 } // namespace dart |
| 447 | 442 |
| 448 #endif // defined(HOST_OS_MACOS) | 443 #endif // defined(HOST_OS_MACOS) |
| OLD | NEW |