| Index: Source/wtf/WTF.cpp
|
| diff --git a/Source/wtf/WTF.cpp b/Source/wtf/WTF.cpp
|
| index d199fbe5fa7a4255611224d20faa5206f8284af3..d3ec16099d26dfdd6f911c4b2d618734f13bcb77 100644
|
| --- a/Source/wtf/WTF.cpp
|
| +++ b/Source/wtf/WTF.cpp
|
| @@ -31,8 +31,9 @@
|
| #include "config.h"
|
| #include "WTF.h"
|
|
|
| -#include "wtf/DefaultAllocator.h"
|
| +#include "wtf/Assertions.h"
|
| #include "wtf/FastMalloc.h"
|
| +#include "wtf/Partitions.h"
|
|
|
| namespace WTF {
|
|
|
| @@ -40,8 +41,6 @@ extern void initializeThreading();
|
|
|
| bool s_initialized;
|
| bool s_shutdown;
|
| -bool Partitions::s_initialized;
|
| -PartitionAllocatorGeneric Partitions::m_bufferAllocator;
|
|
|
| void initialize(TimeFunction currentTimeFunction, TimeFunction monotonicallyIncreasingTimeFunction)
|
| {
|
| @@ -50,9 +49,9 @@ void initialize(TimeFunction currentTimeFunction, TimeFunction monotonicallyIncr
|
| ASSERT(!s_initialized);
|
| ASSERT(!s_shutdown);
|
| s_initialized = true;
|
| - Partitions::initialize();
|
| setCurrentTimeFunction(currentTimeFunction);
|
| setMonotonicallyIncreasingTimeFunction(monotonicallyIncreasingTimeFunction);
|
| + Partitions::initialize();
|
| initializeThreading();
|
| }
|
|
|
| @@ -69,22 +68,4 @@ bool isShutdown()
|
| return s_shutdown;
|
| }
|
|
|
| -void Partitions::initialize()
|
| -{
|
| - static int lock = 0;
|
| - // Guard against two threads hitting here in parallel.
|
| - spinLockLock(&lock);
|
| - if (!s_initialized) {
|
| - m_bufferAllocator.init();
|
| - s_initialized = true;
|
| - }
|
| - spinLockUnlock(&lock);
|
| -}
|
| -
|
| -void Partitions::shutdown()
|
| -{
|
| - fastMallocShutdown();
|
| - m_bufferAllocator.shutdown();
|
| -}
|
| -
|
| } // namespace WTF
|
|
|