Allocating a new lock whenever a pool moves
authorNikhil Jain <nikhil@illinois.edu>
Fri, 13 Jan 2012 03:58:08 +0000 (21:58 -0600)
committerNikhil Jain <nikhil@illinois.edu>
Fri, 13 Jan 2012 03:58:08 +0000 (21:58 -0600)
src/conv-core/isomalloc.c

index 34bab6cef1da52e6b3a129d98e069b7800e5c0e4..16b18ef40ab6bdf3dd41a69968c198474df8e88a 100644 (file)
@@ -2615,6 +2615,7 @@ void CmiIsomallocBlockListPup(pup_er p,CmiIsomallocBlockList **lp, CthThread tid
       pup_bytes(p,&slot,sizeof(slot));
       newblock = map_slots(slot,size/slotsize);
       if(flag) {
+        mptr = (mempool_type*)newblock;
         pup_bytes(p,newblock,sizeof(mempool_type));
         newblock = (char*)newblock + sizeof(mempool_type);
         flag = 0;
@@ -2634,6 +2635,9 @@ void CmiIsomallocBlockListPup(pup_er p,CmiIsomallocBlockList **lp, CthThread tid
         newblock = (char*)newblock + flags[0];
       }
     }
+#if CMK_USE_MEMPOOL_ISOMALLOC || (CMK_SMP && CMK_CONVERSE_GEMINI_UGNI)
+    mptr->mempoolLock = CmiCreateLock();
+#endif  
   }
   pup_bytes(p,lp,sizeof(int*));
   if(pup_isDeleting(p)) {