[llvm-commits] CVS: poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 1 21:34:26 PST 2004
Changes in directory poolalloc/runtime/FL2Allocator:
FreeListAllocator.cpp updated: 1.13 -> 1.14
---
Log message:
Make this compile :)
---
Diffs of the changes: (+3 -2)
Index: poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp
diff -u poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.13 poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.14
--- poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp:1.13 Mon Nov 1 23:28:10 2004
+++ poolalloc/runtime/FL2Allocator/FreeListAllocator.cpp Mon Nov 1 23:34:16 2004
@@ -334,10 +334,11 @@
abort();
}
- // Check to see how many elements were allocated to this node...
+ // Check to see how many bytes were allocated to this node.
FreedNodeHeader *FNH = (FreedNodeHeader*)((char*)Node-sizeof(NodeHeader));
assert((FNH->Header.Size & 1) && "Node not allocated!");
- if (Size != ~1U) return FNH->Header.Size & ~1;
+ unsigned Size = FNH->Header.Size & ~1;
+ if (Size != ~1U) return Size;
// Otherwise, we have a large array.
//LargeArrayHeader *LAH = ((LargeArrayHeader*)Node)-1;
More information about the llvm-commits
mailing list