OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ZONE_H_ | 5 #ifndef V8_ZONE_H_ |
6 #define V8_ZONE_H_ | 6 #define V8_ZONE_H_ |
7 | 7 |
8 #include "allocation.h" | 8 #include "allocation.h" |
9 #include "checks.h" | 9 #include "checks.h" |
10 #include "hashmap.h" | 10 #include "hashmap.h" |
11 #include "globals.h" | 11 #include "globals.h" |
12 #include "list.h" | 12 #include "list.h" |
13 #include "splay-tree.h" | 13 #include "splay-tree.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 #if defined(__has_feature) | |
19 #if __has_feature(address_sanitizer) | |
20 #define V8_USE_ADDRESS_SANITIZER | |
21 #endif | |
22 #endif | |
23 | 18 |
24 class Segment; | 19 class Segment; |
25 class Isolate; | 20 class Isolate; |
26 | 21 |
27 // The Zone supports very fast allocation of small chunks of | 22 // The Zone supports very fast allocation of small chunks of |
28 // memory. The chunks cannot be deallocated individually, but instead | 23 // memory. The chunks cannot be deallocated individually, but instead |
29 // the Zone supports deallocating all chunks in one fast | 24 // the Zone supports deallocating all chunks in one fast |
30 // operation. The Zone is used to hold temporary data structures like | 25 // operation. The Zone is used to hold temporary data structures like |
31 // the abstract syntax tree, which is deallocated after compilation. | 26 // the abstract syntax tree, which is deallocated after compilation. |
32 | 27 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 void operator delete(void* pointer) { UNREACHABLE(); } | 234 void operator delete(void* pointer) { UNREACHABLE(); } |
240 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } | 235 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } |
241 }; | 236 }; |
242 | 237 |
243 | 238 |
244 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; | 239 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; |
245 | 240 |
246 } } // namespace v8::internal | 241 } } // namespace v8::internal |
247 | 242 |
248 #endif // V8_ZONE_H_ | 243 #endif // V8_ZONE_H_ |
OLD | NEW |