Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1552)

Unified Diff: Source/wtf/Partitions.cpp

Issue 1044143002: Oilpan: Centralize Partition allocators into Partitions.h (part 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/Partitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Partitions.cpp
diff --git a/Source/wtf/Partitions.cpp b/Source/wtf/Partitions.cpp
index 8d131d408d1f0a15f5535aeab7273be58f198340..800632ea4a009c43f26dd95ac4e1a18aab0a100b 100644
--- a/Source/wtf/Partitions.cpp
+++ b/Source/wtf/Partitions.cpp
@@ -38,6 +38,7 @@ namespace WTF {
bool Partitions::s_initialized;
+PartitionAllocatorGeneric Partitions::m_fastMallocAllocator;
PartitionAllocatorGeneric Partitions::m_bufferAllocator;
SizeSpecificPartitionAllocator<3328> Partitions::m_objectModelAllocator;
SizeSpecificPartitionAllocator<1024> Partitions::m_renderingAllocator;
@@ -48,6 +49,7 @@ void Partitions::initialize()
// Guard against two threads hitting here in parallel.
spinLockLock(&lock);
if (!s_initialized) {
+ m_fastMallocAllocator.init();
m_bufferAllocator.init();
m_objectModelAllocator.init();
m_renderingAllocator.init();
@@ -58,14 +60,13 @@ void Partitions::initialize()
void Partitions::shutdown()
{
- fastMallocShutdown();
-
// We could ASSERT here for a memory leak within the partition, but it leads
// to very hard to diagnose ASSERTs, so it's best to leave leak checking for
// the valgrind and heapcheck bots, which run without partitions.
(void) m_renderingAllocator.shutdown();
(void) m_objectModelAllocator.shutdown();
(void) m_bufferAllocator.shutdown();
+ (void) m_fastMallocAllocator.shutdown();
}
} // namespace WTF
« no previous file with comments | « Source/wtf/Partitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698