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

Side by Side Diff: third_party/WebKit/Source/wtf/allocator/PartitionAllocator.h

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WTF_PartitionAllocator_h 5 #ifndef WTF_PartitionAllocator_h
6 #define WTF_PartitionAllocator_h 6 #define WTF_PartitionAllocator_h
7 7
8 // This is the allocator that is used for allocations that are not on the 8 // This is the allocator that is used for allocations that are not on the
9 // traced, garbage collected heap. It uses FastMalloc for collections, 9 // traced, garbage collected heap. It uses FastMalloc for collections,
10 // but uses the partition allocator for the backing store of the collections. 10 // but uses the partition allocator for the backing store of the collections.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void* operator new(size_t size) { \ 121 void* operator new(size_t size) { \
122 return Allocator::template malloc<void*, ClassName>( \ 122 return Allocator::template malloc<void*, ClassName>( \
123 size, WTF_HEAP_PROFILER_TYPE_NAME(ClassName)); \ 123 size, WTF_HEAP_PROFILER_TYPE_NAME(ClassName)); \
124 } \ 124 } \
125 void operator delete(void* p) { Allocator::free(p); } \ 125 void operator delete(void* p) { Allocator::free(p); } \
126 void* operator new[](size_t size) { \ 126 void* operator new[](size_t size) { \
127 return Allocator::template newArray<ClassName>(size); \ 127 return Allocator::template newArray<ClassName>(size); \
128 } \ 128 } \
129 void operator delete[](void* p) { Allocator::deleteArray(p); } \ 129 void operator delete[](void* p) { Allocator::deleteArray(p); } \
130 void* operator new(size_t, NotNullTag, void* location) { \ 130 void* operator new(size_t, NotNullTag, void* location) { \
131 ASSERT(location); \ 131 DCHECK(location); \
132 return location; \ 132 return location; \
133 } \ 133 } \
134 void* operator new(size_t, void* location) { return location; } \ 134 void* operator new(size_t, void* location) { return location; } \
135 \ 135 \
136 private: \ 136 private: \
137 typedef int __thisIsHereToForceASemicolonAfterThisMacro 137 typedef int __thisIsHereToForceASemicolonAfterThisMacro
138 138
139 #endif // WTF_PartitionAllocator_h 139 #endif // WTF_PartitionAllocator_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Vector.h ('k') | third_party/WebKit/Source/wtf/allocator/Partitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698