1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Add an assertion to the fixed-size allocator to ensure that we don't request

an allocation that is greater than what we will actually allocate.

Patch by Artyom Skrobov!

llvm-svn: 189340
This commit is contained in:
Joey Gouly 2013-08-27 11:20:13 +00:00
parent 24c6842d69
commit 83d3a87ed2

View File

@ -60,9 +60,10 @@ public:
}
template<class AllocatorType, class T, size_t Size, size_t Align>
inline void *operator new(size_t,
inline void *operator new(size_t size,
llvm::RecyclingAllocator<AllocatorType,
T, Size, Align> &Allocator) {
assert(size <= Size && "allocation size exceeded");
return Allocator.Allocate();
}