[llvm-commits] CVS: llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 10 11:06:09 PST 2005
Changes in directory llvm-poolalloc/runtime/FL2Allocator:
FreeListAllocator.cpp updated: 1.42 -> 1.43
---
Log message:
track peak heap more accurately
---
Diffs of the changes: (+2 -2)
FreeListAllocator.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp
diff -u llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.42 llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.43
--- llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.42 Sat Mar 5 00:02:04 2005
+++ llvm-poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp Thu Mar 10 13:05:53 2005
@@ -529,7 +529,7 @@
NumBytes = (NumBytes & ~(Alignment-1)) -
sizeof(FreedNodeHeader<PoolTraits>); // Truncate
- DO_IF_PNP(CurHeapSize += NumBytes);
+ DO_IF_PNP(CurHeapSize += (NumBytes + sizeof(NodeHeader<PoolTraits>)));
DO_IF_PNP(if (CurHeapSize > MaxHeapSize) MaxHeapSize = CurHeapSize);
DO_IF_PNP(++Pool->NumObjects);
@@ -671,7 +671,7 @@
if (Size == ~1U) goto LargeArrayCase;
DO_IF_TRACE(fprintf(stderr, "%d bytes\n", Size));
- DO_IF_PNP(CurHeapSize -= Size);
+ DO_IF_PNP(CurHeapSize -= (Size + sizeof(NodeHeader<PoolTraits>)));
// If the node immediately after this one is also free, merge it into node.
FreedNodeHeader<PoolTraits> *NextFNH;
More information about the llvm-commits
mailing list