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_MEMORY_REGION_H_ | 5 #ifndef VM_MEMORY_REGION_H_ |
6 #define VM_MEMORY_REGION_H_ | 6 #define VM_MEMORY_REGION_H_ |
7 | 7 |
8 #include "vm/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" |
9 | 10 |
10 namespace dart { | 11 namespace dart { |
11 | 12 |
12 // Memory regions are useful for accessing memory with bounds check in | 13 // Memory regions are useful for accessing memory with bounds check in |
13 // debug mode. They can be safely passed by value and do not assume ownership | 14 // debug mode. They can be safely passed by value and do not assume ownership |
14 // of the region. | 15 // of the region. |
15 class MemoryRegion { | 16 class MemoryRegion { |
16 public: | 17 public: |
17 MemoryRegion() : pointer_(NULL), size_(0) { } | 18 MemoryRegion() : pointer_(NULL), size_(0) { } |
18 MemoryRegion(void* pointer, uword size) : pointer_(pointer), size_(size) { } | 19 MemoryRegion(void* pointer, uword size) : pointer_(pointer), size_(size) { } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 77 |
77 void* pointer_; | 78 void* pointer_; |
78 uword size_; | 79 uword size_; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(MemoryRegion); | 81 DISALLOW_COPY_AND_ASSIGN(MemoryRegion); |
81 }; | 82 }; |
82 | 83 |
83 } // namespace dart | 84 } // namespace dart |
84 | 85 |
85 #endif // VM_MEMORY_REGION_H_ | 86 #endif // VM_MEMORY_REGION_H_ |
OLD | NEW |