[llvm-commits] [poolalloc] r73724 - in /poolalloc/trunk: include/poolalloc/PoolAllocate.h lib/PoolAllocate/PASimple.cpp

Haohui Mai mai4 at uiuc.edu
Thu Jun 18 14:15:00 PDT 2009


Author: mai4
Date: Thu Jun 18 16:15:00 2009
New Revision: 73724

URL: http://llvm.org/viewvc/llvm-project?rev=73724&view=rev
Log:
Enlarge the size of pool descriptor to match the update with SAFECode.
Also make the global pool descriptor visible to SAFECode by changing the linking
to ExternalLinkage.


Modified:
    poolalloc/trunk/include/poolalloc/PoolAllocate.h
    poolalloc/trunk/lib/PoolAllocate/PASimple.cpp

Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=73724&r1=73723&r2=73724&view=diff

==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Thu Jun 18 16:15:00 2009
@@ -238,7 +238,7 @@
   const Type * getPoolType() {
     Type * VoidPtrType = PointerType::getUnqual(Type::Int8Ty);
     if (SAFECodeEnabled)
-      return ArrayType::get(VoidPtrType, 50);
+      return ArrayType::get(VoidPtrType, 92);
     else
       return ArrayType::get(VoidPtrType, 16);
   }

Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=73724&r1=73723&r2=73724&view=diff

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Thu Jun 18 16:15:00 2009
@@ -353,8 +353,8 @@
                                       unsigned Align,
                                       Module& M) {
   GlobalVariable *GV =
-    new GlobalVariable(getPoolType(), false, GlobalValue::InternalLinkage, 
-                       Constant::getNullValue(getPoolType()), "poolalloc.GlobalPool",
+    new GlobalVariable(getPoolType(), false, GlobalValue::ExternalLinkage, 
+                       Constant::getNullValue(getPoolType()), "__poolalloc_GlobalPool",
                        &M);
 
   Function *InitFunc = Function::Create





More information about the llvm-commits mailing list