When creating a new pointer compression pool, stagger the beginning of the
pool by an extra node.
This has the effect of ensuring that pools can be aligned on different
page boundaries, reducing cache conflicts (in theory).

llvm-svn: 22181
diff --git a/poolalloc/runtime/FL2Allocator/PoolAllocator.cpp b/poolalloc/runtime/FL2Allocator/PoolAllocator.cpp
index 2c65950..0abcb3a 100644
--- a/poolalloc/runtime/FL2Allocator/PoolAllocator.cpp
+++ b/poolalloc/runtime/FL2Allocator/PoolAllocator.cpp
@@ -883,6 +883,8 @@
                   unsigned DeclaredSize, unsigned ObjAlignment) {
   poolinit_internal(Pool, DeclaredSize, ObjAlignment);
 
+  static int count=0;
+
   // Create the pool.  We have to do this eagerly (instead of on the first
   // allocation), because code may want to eagerly copy the pool base into a
   // register.
@@ -898,7 +900,11 @@
   if (Pool->Slabs == 0) {
     // Didn't find an existing pool, create one.
     Pool->Slabs = (PoolSlab<CompressedPoolTraits>*)
-                      AllocateSpaceWithMMAP(POOLSIZE, true);
+                      AllocateSpaceWithMMAP(POOLSIZE + (DeclaredSize * count), true);
+    Pool->Slabs += (DeclaredSize * count);
+#if 1
+    count++;
+#endif
     DO_IF_TRACE(fprintf(stderr, "RESERVED ADDR SPACE: %p -> %p\n",
                         Pool->Slabs, (char*)Pool->Slabs+POOLSIZE));
   }