| 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 VM_OS_H_ | 5 #ifndef VM_OS_H_ |
| 6 #define VM_OS_H_ | 6 #define VM_OS_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 | 9 |
| 10 // Forward declarations. | 10 // Forward declarations. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return result; | 53 return result; |
| 54 } | 54 } |
| 55 | 55 |
| 56 // Returns an aligned pointer in the C heap with room for size bytes. | 56 // Returns an aligned pointer in the C heap with room for size bytes. |
| 57 // Alignment must be >= 16 and a power of two. | 57 // Alignment must be >= 16 and a power of two. |
| 58 static void* AlignedAllocate(intptr_t size, intptr_t alignment); | 58 static void* AlignedAllocate(intptr_t size, intptr_t alignment); |
| 59 | 59 |
| 60 // Frees a pointer returned from AlignedAllocate. | 60 // Frees a pointer returned from AlignedAllocate. |
| 61 static void AlignedFree(void* ptr); | 61 static void AlignedFree(void* ptr); |
| 62 | 62 |
| 63 // Returns the activation frame alignment constraint or zero if | 63 // Returns the activation frame alignment constraint or one if |
| 64 // the platform doesn't care. Guaranteed to be a power of two. | 64 // the platform doesn't care. Guaranteed to be a power of two. |
| 65 static word ActivationFrameAlignment(); | 65 static word ActivationFrameAlignment(); |
| 66 | 66 |
| 67 // This constant is guaranteed to be greater or equal to the | 67 // This constant is guaranteed to be greater or equal to the |
| 68 // preferred code alignment on all platforms. | 68 // preferred code alignment on all platforms. |
| 69 static const int kMaxPreferredCodeAlignment = 32; | 69 static const int kMaxPreferredCodeAlignment = 32; |
| 70 | 70 |
| 71 // Returns the preferred code alignment or zero if | 71 // Returns the preferred code alignment or zero if |
| 72 // the platform doesn't care. Guaranteed to be a power of two. | 72 // the platform doesn't care. Guaranteed to be a power of two. |
| 73 static word PreferredCodeAlignment(); | 73 static word PreferredCodeAlignment(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 static void Shutdown(); | 131 static void Shutdown(); |
| 132 | 132 |
| 133 static void Abort(); | 133 static void Abort(); |
| 134 | 134 |
| 135 static void Exit(int code); | 135 static void Exit(int code); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace dart | 138 } // namespace dart |
| 139 | 139 |
| 140 #endif // VM_OS_H_ | 140 #endif // VM_OS_H_ |
| OLD | NEW |