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

Unified Diff: third_party/WebKit/Source/wtf/Allocator.h

Issue 2518253002: Move Partition Allocator into Chromium base. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: third_party/WebKit/Source/wtf/Allocator.h
diff --git a/third_party/WebKit/Source/wtf/Allocator.h b/third_party/WebKit/Source/wtf/Allocator.h
index c87ccaafdf3aa60b4e3b462b92382dede7de72c9..045ea49f6ba1721b208281c73e4c84ccfb38c355 100644
--- a/third_party/WebKit/Source/wtf/Allocator.h
+++ b/third_party/WebKit/Source/wtf/Allocator.h
@@ -5,9 +5,9 @@
#ifndef WTF_Allocator_h
#define WTF_Allocator_h
+#include "base/allocator/partition_allocator/partitions.h"
#include "wtf/Assertions.h"
#include "wtf/StdLibExtras.h"
-#include "wtf/allocator/Partitions.h"
namespace WTF {
@@ -101,28 +101,28 @@ namespace WTF {
// };
//
-#define USING_FAST_MALLOC_INTERNAL(type, typeName) \
- public: \
- void* operator new(size_t, void* p) { return p; } \
- void* operator new[](size_t, void* p) { return p; } \
- \
- void* operator new(size_t size) { \
- return ::WTF::Partitions::fastMalloc(size, typeName); \
- } \
- \
- void operator delete(void* p) { ::WTF::Partitions::fastFree(p); } \
- \
- void* operator new[](size_t size) { \
- return ::WTF::Partitions::fastMalloc(size, typeName); \
- } \
- \
- void operator delete[](void* p) { ::WTF::Partitions::fastFree(p); } \
- void* operator new(size_t, NotNullTag, void* location) { \
- ASSERT(location); \
- return location; \
- } \
- \
- private: \
+#define USING_FAST_MALLOC_INTERNAL(type, typeName) \
+ public: \
+ void* operator new(size_t, void* p) { return p; } \
+ void* operator new[](size_t, void* p) { return p; } \
+ \
+ void* operator new(size_t size) { \
+ return ::base::Partitions::fastMalloc(size, typeName); \
+ } \
+ \
+ void operator delete(void* p) { ::base::Partitions::fastFree(p); } \
+ \
+ void* operator new[](size_t size) { \
+ return ::base::Partitions::fastMalloc(size, typeName); \
+ } \
+ \
+ void operator delete[](void* p) { ::base::Partitions::fastFree(p); } \
+ void* operator new(size_t, NotNullTag, void* location) { \
+ DCHECK(location); \
+ return location; \
+ } \
+ \
+ private: \
typedef int __thisIsHereToForceASemicolonAfterThisMacro
// Both of these macros enable fast malloc and provide type info to the heap

Powered by Google App Engine
This is Rietveld 408576698