Index: Source/wtf/DefaultAllocator.h |
diff --git a/Source/wtf/DefaultAllocator.h b/Source/wtf/DefaultAllocator.h |
index 67071e06850334e00dd492fea8762698103b70d7..e4e8e7851cde73044f960983c97fa5b28afe339b 100644 |
--- a/Source/wtf/DefaultAllocator.h |
+++ b/Source/wtf/DefaultAllocator.h |
@@ -38,7 +38,6 @@ |
#include "wtf/Assertions.h" |
#include "wtf/FastAllocBase.h" |
#include "wtf/PartitionAlloc.h" |
-#include "wtf/QuantizedAllocation.h" |
#include "wtf/WTF.h" |
#include <string.h> |
@@ -47,9 +46,20 @@ namespace WTF { |
class DefaultAllocatorDummyVisitor; |
+class DefaultAllocatorQuantizer { |
+public: |
+ template<typename T> |
+ static size_t quantizedSize(size_t count) |
+ { |
+ RELEASE_ASSERT(count <= kMaxUnquantizedAllocation / sizeof(T)); |
+ return partitionAllocActualSize(Partitions::getBufferPartition(), count * sizeof(T)); |
+ } |
+ static const size_t kMaxUnquantizedAllocation = kGenericMaxDirectMapped; |
+}; |
+ |
class DefaultAllocator { |
public: |
- typedef WTF::QuantizedAllocation Quantizer; |
+ typedef DefaultAllocatorQuantizer Quantizer; |
typedef DefaultAllocatorDummyVisitor Visitor; |
static const bool isGarbageCollected = false; |
template<typename T, typename Traits> |