Index: Source/wtf/FastMalloc.cpp |
diff --git a/Source/wtf/FastMalloc.cpp b/Source/wtf/FastMalloc.cpp |
index 24640bbbd558cedbf4e8b5b99317c3bc09bb6658..3b3d8d2aaf823a8451cbb05ea7e690b54b6675f5 100644 |
--- a/Source/wtf/FastMalloc.cpp |
+++ b/Source/wtf/FastMalloc.cpp |
@@ -31,10 +31,16 @@ |
#include "config.h" |
#include "wtf/FastMalloc.h" |
+#include "wtf/PartitionAlloc.h" |
+#include "wtf/SpinLock.h" |
#include <string.h> |
namespace WTF { |
+static PartitionAllocatorGeneric gPartition; |
+static int gLock = 0; |
+static bool gInitialized = false; |
+ |
void* fastZeroedMalloc(size_t n) |
{ |
void* result = fastMalloc(n); |
@@ -56,54 +62,6 @@ FastMallocStatistics fastMallocStatistics() |
return statistics; |
} |
-} // namespace WTF |
- |
-#if USE(SYSTEM_MALLOC) |
- |
-#include "wtf/Assertions.h" |
- |
-#include <stdlib.h> |
- |
-namespace WTF { |
- |
-void fastMallocShutdown() |
-{ |
-} |
- |
-void* fastMalloc(size_t n) |
-{ |
- void* result = malloc(n); |
- ASSERT(result); // We expect tcmalloc underneath, which would crash instead of getting here. |
- |
- return result; |
-} |
- |
-void fastFree(void* p) |
-{ |
- free(p); |
-} |
- |
-void* fastRealloc(void* p, size_t n) |
-{ |
- void* result = realloc(p, n); |
- ASSERT(result); // We expect tcmalloc underneath, which would crash instead of getting here. |
- |
- return result; |
-} |
- |
-} // namespace WTF |
- |
-#else // USE(SYSTEM_MALLOC) |
- |
-#include "wtf/PartitionAlloc.h" |
-#include "wtf/SpinLock.h" |
- |
-namespace WTF { |
- |
-static PartitionAllocatorGeneric gPartition; |
-static int gLock = 0; |
-static bool gInitialized = false; |
- |
void fastMallocShutdown() |
{ |
gPartition.shutdown(); |
@@ -133,5 +91,3 @@ void* fastRealloc(void* p, size_t n) |
} |
} // namespace WTF |
- |
-#endif // USE(SYSTEM_MALLOC) |