[llvm-commits] CVS: llvm-poolalloc/runtime/PtrCompAllocator/PtrCompAllocator.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Feb 22 12:20:21 PST 2005



Changes in directory llvm-poolalloc/runtime/PtrCompAllocator:

PtrCompAllocator.cpp updated: 1.4 -> 1.5
---
Log message:

Compute aligned object size correctly to avoid allocating too much memory
for each node.


---
Diffs of the changes:  (+1 -1)

 PtrCompAllocator.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm-poolalloc/runtime/PtrCompAllocator/PtrCompAllocator.cpp
diff -u llvm-poolalloc/runtime/PtrCompAllocator/PtrCompAllocator.cpp:1.4 llvm-poolalloc/runtime/PtrCompAllocator/PtrCompAllocator.cpp:1.5
--- llvm-poolalloc/runtime/PtrCompAllocator/PtrCompAllocator.cpp:1.4	Tue Feb 22 14:16:02 2005
+++ llvm-poolalloc/runtime/PtrCompAllocator/PtrCompAllocator.cpp	Tue Feb 22 14:20:06 2005
@@ -150,7 +150,7 @@
   Pool->OrigSize = OldSize;
 
   // Round up to the next alignment boundary.
-  Pool->NewSize = (NewSize+NewSize-1) & ~(ObjAlignment-1);
+  Pool->NewSize = (NewSize+ObjAlignment-1) & ~(ObjAlignment-1);
 
   Pool->PoolBase = 0;
   Pool->BitVector = 0;






More information about the llvm-commits mailing list