OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 return Allocator::template malloc<void*, ClassName>(size, WTF_HEAP_PROFI
LER_TYPE_NAME(ClassName)); \ | 148 return Allocator::template malloc<void*, ClassName>(size, WTF_HEAP_PROFI
LER_TYPE_NAME(ClassName)); \ |
149 } \ | 149 } \ |
150 void operator delete(void* p) { Allocator::free(p); } \ | 150 void operator delete(void* p) { Allocator::free(p); } \ |
151 void* operator new[](size_t size) { return Allocator::template newArray<Clas
sName>(size); } \ | 151 void* operator new[](size_t size) { return Allocator::template newArray<Clas
sName>(size); } \ |
152 void operator delete[](void* p) { Allocator::deleteArray(p); } \ | 152 void operator delete[](void* p) { Allocator::deleteArray(p); } \ |
153 void* operator new(size_t, NotNullTag, void* location) \ | 153 void* operator new(size_t, NotNullTag, void* location) \ |
154 { \ | 154 { \ |
155 ASSERT(location); \ | 155 ASSERT(location); \ |
156 return location; \ | 156 return location; \ |
157 } \ | 157 } \ |
| 158 void* operator new(size_t, void* location) { return location; } \ |
158 private: \ | 159 private: \ |
159 typedef int __thisIsHereToForceASemicolonAfterThisMacro | 160 typedef int __thisIsHereToForceASemicolonAfterThisMacro |
160 | 161 |
161 using WTF::PartitionAllocator; | 162 using WTF::PartitionAllocator; |
162 | 163 |
163 #endif // WTF_PartitionAllocator_h | 164 #endif // WTF_PartitionAllocator_h |
OLD | NEW |