| 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 |
| 18 | 23 |
| 19 class Segment; | 24 class Segment; |
| 20 class Isolate; | 25 class Isolate; |
| 21 | 26 |
| 22 // The Zone supports very fast allocation of small chunks of | 27 // The Zone supports very fast allocation of small chunks of |
| 23 // memory. The chunks cannot be deallocated individually, but instead | 28 // memory. The chunks cannot be deallocated individually, but instead |
| 24 // the Zone supports deallocating all chunks in one fast | 29 // the Zone supports deallocating all chunks in one fast |
| 25 // operation. The Zone is used to hold temporary data structures like | 30 // operation. The Zone is used to hold temporary data structures like |
| 26 // the abstract syntax tree, which is deallocated after compilation. | 31 // the abstract syntax tree, which is deallocated after compilation. |
| 27 | 32 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 void operator delete(void* pointer) { UNREACHABLE(); } | 239 void operator delete(void* pointer) { UNREACHABLE(); } |
| 235 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } | 240 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } |
| 236 }; | 241 }; |
| 237 | 242 |
| 238 | 243 |
| 239 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; | 244 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; |
| 240 | 245 |
| 241 } } // namespace v8::internal | 246 } } // namespace v8::internal |
| 242 | 247 |
| 243 #endif // V8_ZONE_H_ | 248 #endif // V8_ZONE_H_ |
| OLD | NEW |