OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium 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 WTF_PartitionAllocator_h | 5 #ifndef WTF_PartitionAllocator_h |
6 #define WTF_PartitionAllocator_h | 6 #define WTF_PartitionAllocator_h |
7 | 7 |
8 // This is the allocator that is used for allocations that are not on the | 8 // This is the allocator that is used for allocations that are not on the |
9 // traced, garbage collected heap. It uses FastMalloc for collections, | 9 // traced, garbage collected heap. It uses FastMalloc for collections, |
10 // but uses the partition allocator for the backing store of the collections. | 10 // but uses the partition allocator for the backing store of the collections. |
11 | 11 |
| 12 #include <string.h> |
12 #include "base/allocator/partition_allocator/partition_alloc.h" | 13 #include "base/allocator/partition_allocator/partition_alloc.h" |
13 #include "platform/wtf/Allocator.h" | 14 #include "platform/wtf/Allocator.h" |
14 #include "platform/wtf/Assertions.h" | 15 #include "platform/wtf/Assertions.h" |
15 #include "platform/wtf/TypeTraits.h" | 16 #include "platform/wtf/TypeTraits.h" |
16 #include "platform/wtf/WTFExport.h" | 17 #include "platform/wtf/WTFExport.h" |
17 #include <string.h> | |
18 | 18 |
19 namespace WTF { | 19 namespace WTF { |
20 | 20 |
21 class PartitionAllocatorDummyVisitor { | 21 class PartitionAllocatorDummyVisitor { |
22 DISALLOW_NEW(); | 22 DISALLOW_NEW(); |
23 }; | 23 }; |
24 | 24 |
25 class WTF_EXPORT PartitionAllocator { | 25 class WTF_EXPORT PartitionAllocator { |
26 public: | 26 public: |
27 typedef PartitionAllocatorDummyVisitor Visitor; | 27 typedef PartitionAllocatorDummyVisitor Visitor; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void* operator new(size_t, NotNullTag, void* location) { \ | 136 void* operator new(size_t, NotNullTag, void* location) { \ |
137 DCHECK(location); \ | 137 DCHECK(location); \ |
138 return location; \ | 138 return location; \ |
139 } \ | 139 } \ |
140 void* operator new(size_t, void* location) { return location; } \ | 140 void* operator new(size_t, void* location) { return location; } \ |
141 \ | 141 \ |
142 private: \ | 142 private: \ |
143 typedef int __thisIsHereToForceASemicolonAfterThisMacro | 143 typedef int __thisIsHereToForceASemicolonAfterThisMacro |
144 | 144 |
145 #endif // WTF_PartitionAllocator_h | 145 #endif // WTF_PartitionAllocator_h |
OLD | NEW |