[llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp
John Criswell
criswell at cs.uiuc.edu
Wed Oct 27 19:02:02 PDT 2004
Changes in directory poolalloc/runtime/FreeListAllocator:
PoolAllocator.cpp updated: 1.31 -> 1.32
---
Log message:
Use intptr_t to get an integer that is big enough to hold the pointer.
This is used for Solaris.
More changes may become necessary due to pointer size changes.
---
Diffs of the changes: (+4 -2)
Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp
diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.31 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.32
--- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.31 Fri Nov 14 16:36:06 2003
+++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Wed Oct 27 21:01:51 2004
@@ -19,6 +19,8 @@
#include <stdlib.h>
#include <stdio.h>
+#include "llvm/Support/DataTypes.h"
+
//===----------------------------------------------------------------------===//
//
// PoolSlab implementation
@@ -117,7 +119,7 @@
//
// Convert the node pointer into a slab pointer.
//
- return reinterpret_cast<struct SlabHeader *>(reinterpret_cast<unsigned int>(p.Next) & ~(PageSize - 1));
+ return reinterpret_cast<struct SlabHeader *>(reinterpret_cast<intptr_t>(p.Next) & ~(PageSize - 1));
}
//
@@ -129,7 +131,7 @@
inline struct SlabHeader *
DataOwner (unsigned int PageSize, void * p)
{
- return reinterpret_cast<struct SlabHeader *>(reinterpret_cast<unsigned int>(p) & ~(PageSize - 1));
+ return reinterpret_cast<struct SlabHeader *>(reinterpret_cast<intptr_t>(p) & ~(PageSize - 1));
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list