Kill the LLVM global lock.
[oota-llvm.git] / include / llvm / Support / RecyclingAllocator.h
index f67503f6fb7ada7516f77ac3c3e4304cc3d75740..001d1cf7c3df2f08e85776ef7cb94e63a12479ca 100644 (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();
 }