[llvm] r175687 - as the allocator is reset zero out the number of bytes allocated, this was just

Pedro Artigas partigas at apple.com
Wed Feb 20 15:30:57 PST 2013


Author: partigas
Date: Wed Feb 20 17:30:56 2013
New Revision: 175687

URL: http://llvm.org/viewvc/llvm-project?rev=175687&view=rev
Log:
as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended.

Modified:
    llvm/trunk/lib/Support/Allocator.cpp

Modified: llvm/trunk/lib/Support/Allocator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Allocator.cpp?rev=175687&r1=175686&r2=175687&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Allocator.cpp (original)
+++ llvm/trunk/lib/Support/Allocator.cpp Wed Feb 20 17:30:56 2013
@@ -83,6 +83,7 @@ void BumpPtrAllocator::Reset() {
   CurSlab->NextPtr = 0;
   CurPtr = (char*)(CurSlab + 1);
   End = ((char*)CurSlab) + CurSlab->Size;
+  BytesAllocated = 0;
 }
 
 /// Allocate - Allocate space at the specified alignment.





More information about the llvm-commits mailing list