| OLD | NEW |
| 1 // Copyright (c) 2011, 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 #ifndef VM_ZONE_H_ | 5 #ifndef VM_ZONE_H_ |
| 6 #define VM_ZONE_H_ | 6 #define VM_ZONE_H_ |
| 7 | 7 |
| 8 #include "platform/utils.h" |
| 8 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 9 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| 10 #include "vm/memory_region.h" | 11 #include "vm/memory_region.h" |
| 11 #include "vm/utils.h" | |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 // Zones support very fast allocation of small chunks of memory. The | 15 // Zones support very fast allocation of small chunks of memory. The |
| 16 // chunks cannot be deallocated individually, but instead zones | 16 // chunks cannot be deallocated individually, but instead zones |
| 17 // support deallocating all chunks in one fast operation. | 17 // support deallocating all chunks in one fast operation. |
| 18 | 18 |
| 19 class BaseZone { | 19 class BaseZone { |
| 20 private: | 20 private: |
| 21 BaseZone(); | 21 BaseZone(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 // Check that the result has the proper alignment and return it. | 157 // Check that the result has the proper alignment and return it. |
| 158 ASSERT(Utils::IsAligned(result, kAlignment)); | 158 ASSERT(Utils::IsAligned(result, kAlignment)); |
| 159 return result; | 159 return result; |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace dart | 162 } // namespace dart |
| 163 | 163 |
| 164 #endif // VM_ZONE_H_ | 164 #endif // VM_ZONE_H_ |
| OLD | NEW |