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

John Criswell criswell at cs.uiuc.edu
Fri Nov 14 13:48:02 PST 2003


Changes in directory poolalloc/runtime/FreeListAllocator:

PoolAllocator.cpp updated: 1.24 -> 1.25

---
Log message:

Paranoia: Ensure that we're always allocating something.



---
Diffs of the changes:  (+3 -0)

Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp
diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.24 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.25
--- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.24	Fri Nov 14 11:53:31 2003
+++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp	Fri Nov 14 13:47:12 2003
@@ -230,6 +230,9 @@
 
   assert(Pool && "Null pool pointer passed in to poolalloc!\n");
 
+  // Make sure we allocate something
+  BytesWanted = (BytesWanted ? BytesWanted : 1);
+
   //
   // Determine if we can satisfy this request normally.  If not, then
   // we need to use the array allocation instead.





More information about the llvm-commits mailing list