Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1 | // Copyright 2012 the V8 project authors. All rights reserved. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 4 | |
| 5 | #ifndef V8_ZONE_H_ |
| 6 | #define V8_ZONE_H_ |
| 7 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 8 | #include <limits> |
| 9 | |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 10 | #include "src/base/accounting-allocator.h" |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 11 | #include "src/base/hashmap.h" |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 12 | #include "src/base/logging.h" |
| 13 | #include "src/globals.h" |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 14 | #include "src/list.h" |
| 15 | #include "src/splay-tree.h" |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 16 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 17 | namespace v8 { |
| 18 | namespace internal { |
| 19 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 20 | // Forward declarations. |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 21 | class Segment; |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 22 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 23 | |
| 24 | // The Zone supports very fast allocation of small chunks of |
| 25 | // memory. The chunks cannot be deallocated individually, but instead |
| 26 | // the Zone supports deallocating all chunks in one fast |
| 27 | // operation. The Zone is used to hold temporary data structures like |
| 28 | // the abstract syntax tree, which is deallocated after compilation. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 29 | // |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 30 | // Note: There is no need to initialize the Zone; the first time an |
| 31 | // allocation is attempted, a segment of memory will be requested |
| 32 | // through a call to malloc(). |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 33 | // |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 34 | // Note: The implementation is inherently not thread safe. Do not use |
| 35 | // from multi-threaded code. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 36 | class Zone final { |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 37 | public: |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 38 | explicit Zone(base::AccountingAllocator* allocator); |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 39 | ~Zone(); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 40 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 41 | // Allocate 'size' bytes of memory in the Zone; expands the Zone by |
| 42 | // allocating new segments of memory on demand using malloc(). |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 43 | void* New(size_t size); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 44 | |
| 45 | template <typename T> |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 46 | T* NewArray(size_t length) { |
| 47 | DCHECK_LT(length, std::numeric_limits<size_t>::max() / sizeof(T)); |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 48 | return static_cast<T*>(New(length * sizeof(T))); |
| 49 | } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 50 | |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 51 | // Deletes all objects and free all memory allocated in the Zone. Keeps one |
| 52 | // small (size <= kMaximumKeptSegmentSize) segment around if it finds one. |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 53 | void DeleteAll(); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 54 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 55 | // Deletes the last small segment kept around by DeleteAll(). You |
| 56 | // may no longer allocate in the Zone after a call to this method. |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 57 | void DeleteKeptSegment(); |
| 58 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 59 | // Returns true if more memory has been allocated in zones than |
| 60 | // the limit allows. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 61 | bool excess_allocation() const { |
| 62 | return segment_bytes_allocated_ > kExcessLimit; |
| 63 | } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 64 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 65 | size_t allocation_size() const { return allocation_size_; } |
Ben Murdoch | b8e0da2 | 2011-05-16 14:20:40 +0100 | [diff] [blame] | 66 | |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 67 | base::AccountingAllocator* allocator() const { return allocator_; } |
| 68 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 69 | private: |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 70 | // All pointers returned from New() have this alignment. In addition, if the |
| 71 | // object being allocated has a size that is divisible by 8 then its alignment |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 72 | // will be 8. ASan requires 8-byte alignment. |
| 73 | #ifdef V8_USE_ADDRESS_SANITIZER |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 74 | static const size_t kAlignment = 8; |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 75 | STATIC_ASSERT(kPointerSize <= 8); |
| 76 | #else |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 77 | static const size_t kAlignment = kPointerSize; |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 78 | #endif |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 79 | |
| 80 | // Never allocate segments smaller than this size in bytes. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 81 | static const size_t kMinimumSegmentSize = 8 * KB; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 82 | |
| 83 | // Never allocate segments larger than this size in bytes. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 84 | static const size_t kMaximumSegmentSize = 1 * MB; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 85 | |
| 86 | // Never keep segments larger than this size in bytes around. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 87 | static const size_t kMaximumKeptSegmentSize = 64 * KB; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 88 | |
| 89 | // Report zone excess when allocation exceeds this limit. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 90 | static const size_t kExcessLimit = 256 * MB; |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 91 | |
| 92 | // The number of bytes allocated in this zone so far. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 93 | size_t allocation_size_; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 94 | |
| 95 | // The number of bytes allocated in segments. Note that this number |
| 96 | // includes memory allocated from the OS but not yet allocated from |
| 97 | // the zone. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 98 | size_t segment_bytes_allocated_; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 99 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 100 | // Expand the Zone to hold at least 'size' more bytes and allocate |
| 101 | // the bytes. Returns the address of the newly allocated chunk of |
| 102 | // memory in the Zone. Should only be called if there isn't enough |
| 103 | // room in the Zone already. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 104 | Address NewExpand(size_t size); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 105 | |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 106 | // Creates a new segment, sets it size, and pushes it to the front |
| 107 | // of the segment chain. Returns the new segment. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 108 | inline Segment* NewSegment(size_t size); |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 109 | |
| 110 | // Deletes the given segment. Does not touch the segment chain. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 111 | inline void DeleteSegment(Segment* segment, size_t size); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 112 | |
| 113 | // The free region in the current (front) segment is represented as |
| 114 | // the half-open interval [position, limit). The 'position' variable |
| 115 | // is guaranteed to be aligned as dictated by kAlignment. |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 116 | Address position_; |
| 117 | Address limit_; |
| 118 | |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 119 | base::AccountingAllocator* allocator_; |
| 120 | |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 121 | Segment* segment_head_; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | |
| 125 | // ZoneObject is an abstraction that helps define classes of objects |
| 126 | // allocated in the Zone. Use it as a base class; see ast.h. |
| 127 | class ZoneObject { |
| 128 | public: |
| 129 | // Allocate a new ZoneObject of 'size' bytes in the Zone. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 130 | void* operator new(size_t size, Zone* zone) { return zone->New(size); } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 131 | |
| 132 | // Ideally, the delete operator should be private instead of |
| 133 | // public, but unfortunately the compiler sometimes synthesizes |
| 134 | // (unused) destructors for classes derived from ZoneObject, which |
| 135 | // require the operator to be visible. MSVC requires the delete |
| 136 | // operator to be public. |
| 137 | |
| 138 | // ZoneObjects should never be deleted individually; use |
| 139 | // Zone::DeleteAll() to delete all zone objects in one go. |
| 140 | void operator delete(void*, size_t) { UNREACHABLE(); } |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 141 | void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 142 | }; |
| 143 | |
| 144 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 145 | // The ZoneScope is used to automatically call DeleteAll() on a |
| 146 | // Zone when the ZoneScope is destroyed (i.e. goes out of scope) |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 147 | class ZoneScope final { |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 148 | public: |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 149 | explicit ZoneScope(Zone* zone) : zone_(zone) { } |
| 150 | ~ZoneScope() { zone_->DeleteAll(); } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 151 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 152 | Zone* zone() const { return zone_; } |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 153 | |
| 154 | private: |
| 155 | Zone* zone_; |
| 156 | }; |
| 157 | |
| 158 | |
| 159 | // The ZoneAllocationPolicy is used to specialize generic data |
| 160 | // structures to allocate themselves and their elements in the Zone. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 161 | class ZoneAllocationPolicy final { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 162 | public: |
| 163 | explicit ZoneAllocationPolicy(Zone* zone) : zone_(zone) { } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 164 | void* New(size_t size) { return zone()->New(size); } |
| 165 | static void Delete(void* pointer) {} |
| 166 | Zone* zone() const { return zone_; } |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 167 | |
| 168 | private: |
| 169 | Zone* zone_; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | |
| 173 | // ZoneLists are growable lists with constant-time access to the |
| 174 | // elements. The list itself and all its elements are allocated in the |
| 175 | // Zone. ZoneLists cannot be deleted individually; you can delete all |
| 176 | // objects in the Zone by calling Zone::DeleteAll(). |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 177 | template <typename T> |
| 178 | class ZoneList final : public List<T, ZoneAllocationPolicy> { |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 179 | public: |
| 180 | // Construct a new ZoneList with the given capacity; the length is |
| 181 | // always zero. The capacity must be non-negative. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 182 | ZoneList(int capacity, Zone* zone) |
| 183 | : List<T, ZoneAllocationPolicy>(capacity, ZoneAllocationPolicy(zone)) { } |
| 184 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 185 | void* operator new(size_t size, Zone* zone) { return zone->New(size); } |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 186 | |
| 187 | // Construct a new ZoneList by copying the elements of the given ZoneList. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 188 | ZoneList(const ZoneList<T>& other, Zone* zone) |
| 189 | : List<T, ZoneAllocationPolicy>(other.length(), |
| 190 | ZoneAllocationPolicy(zone)) { |
| 191 | AddAll(other, zone); |
| 192 | } |
| 193 | |
| 194 | // We add some convenience wrappers so that we can pass in a Zone |
| 195 | // instead of a (less convenient) ZoneAllocationPolicy. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 196 | void Add(const T& element, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 197 | List<T, ZoneAllocationPolicy>::Add(element, ZoneAllocationPolicy(zone)); |
| 198 | } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 199 | void AddAll(const List<T, ZoneAllocationPolicy>& other, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 200 | List<T, ZoneAllocationPolicy>::AddAll(other, ZoneAllocationPolicy(zone)); |
| 201 | } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 202 | void AddAll(const Vector<T>& other, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 203 | List<T, ZoneAllocationPolicy>::AddAll(other, ZoneAllocationPolicy(zone)); |
| 204 | } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 205 | void InsertAt(int index, const T& element, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 206 | List<T, ZoneAllocationPolicy>::InsertAt(index, element, |
| 207 | ZoneAllocationPolicy(zone)); |
| 208 | } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 209 | Vector<T> AddBlock(T value, int count, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 210 | return List<T, ZoneAllocationPolicy>::AddBlock(value, count, |
| 211 | ZoneAllocationPolicy(zone)); |
| 212 | } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 213 | void Allocate(int length, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 214 | List<T, ZoneAllocationPolicy>::Allocate(length, ZoneAllocationPolicy(zone)); |
| 215 | } |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 216 | void Initialize(int capacity, Zone* zone) { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 217 | List<T, ZoneAllocationPolicy>::Initialize(capacity, |
| 218 | ZoneAllocationPolicy(zone)); |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 219 | } |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 220 | |
| 221 | void operator delete(void* pointer) { UNREACHABLE(); } |
| 222 | void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 223 | }; |
| 224 | |
| 225 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 226 | // A zone splay tree. The config type parameter encapsulates the |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 227 | // different configurations of a concrete splay tree (see splay-tree.h). |
| 228 | // The tree itself and all its elements are allocated in the Zone. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 229 | template <typename Config> |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 230 | class ZoneSplayTree final : public SplayTree<Config, ZoneAllocationPolicy> { |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 231 | public: |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 232 | explicit ZoneSplayTree(Zone* zone) |
| 233 | : SplayTree<Config, ZoneAllocationPolicy>(ZoneAllocationPolicy(zone)) {} |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 234 | ~ZoneSplayTree() { |
| 235 | // Reset the root to avoid unneeded iteration over all tree nodes |
| 236 | // in the destructor. For a zone-allocated tree, nodes will be |
| 237 | // freed by the Zone. |
| 238 | SplayTree<Config, ZoneAllocationPolicy>::ResetRoot(); |
| 239 | } |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 240 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 241 | void* operator new(size_t size, Zone* zone) { return zone->New(size); } |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 242 | |
| 243 | void operator delete(void* pointer) { UNREACHABLE(); } |
| 244 | void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 245 | }; |
| 246 | |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 247 | typedef base::TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 248 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 249 | } // namespace internal |
| 250 | } // namespace v8 |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 251 | |
| 252 | #endif // V8_ZONE_H_ |