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

Unified Diff: Source/wtf/PartitionAlloc.h

Issue 18242004: Use the partition allocator and run the test in debug too. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Run test in debug. Created 7 years, 6 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/core/platform/Partitions.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PartitionAlloc.h
diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
index cd47e021682d1b37378fd43f5b86d73b0e28a2de..69cdf42b8823008f6e64866d4ab00f6321435bdc 100644
--- a/Source/wtf/PartitionAlloc.h
+++ b/Source/wtf/PartitionAlloc.h
@@ -136,7 +136,7 @@ struct PartitionRoot {
};
WTF_EXPORT void partitionAllocInit(PartitionRoot*);
-WTF_EXPORT void partitionAllocShutdown(PartitionRoot*);
+WTF_EXPORT bool partitionAllocShutdown(PartitionRoot*);
WTF_EXPORT NEVER_INLINE void* partitionAllocSlowPath(PartitionBucket*);
WTF_EXPORT NEVER_INLINE void partitionFreeSlowPath(PartitionPageHeader*);
@@ -184,7 +184,7 @@ ALWAYS_INLINE void* partitionAlloc(PartitionRoot* root, size_t size)
size_t index = size >> kBucketShift;
ASSERT(index < kNumBuckets);
ASSERT(size == index << kBucketShift);
-#if defined(ADDRESS_SANITIZER) || (!defined(NDEBUG) && !defined(DEBUG_PARTITION_ALLOC))
+#if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
return malloc(size);
#else
PartitionBucket* bucket = &root->buckets[index];
@@ -195,7 +195,7 @@ ALWAYS_INLINE void* partitionAlloc(PartitionRoot* root, size_t size)
ALWAYS_INLINE void partitionFree(void* ptr)
{
ASSERT(isMainThread());
-#if defined(ADDRESS_SANITIZER) || (!defined(NDEBUG) && !defined(DEBUG_PARTITION_ALLOC))
+#if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
free(ptr);
#else
uintptr_t pointerAsUint = reinterpret_cast<uintptr_t>(ptr);
« no previous file with comments | « Source/core/platform/Partitions.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698