Cleaning up threads.c
authorNikhil Jain <nikhil@illinois.edu>
Wed, 12 Oct 2011 00:14:57 +0000 (19:14 -0500)
committerNikhil Jain <nikhil@illinois.edu>
Wed, 12 Oct 2011 00:14:57 +0000 (19:14 -0500)
src/conv-core/threads.c

index 1c4f151fae899f2ae55a63280b30eb1e7206d282..9107f2ee13269c97f9aa4f9f017b452791e105dd 100644 (file)
@@ -478,7 +478,9 @@ static void CthThreadBaseFree(CthThreadBase *th)
 #if CMK_THREADS_ALIAS_STACK
     CthAliasFree(th->aliasStackHandle);
 #else /* isomalloc */
-    //CmiIsomallocFree(th->stack);
+#if !USE_MEMPOOL_ISOMALLOC
+    CmiIsomallocFree(th->stack);
+#endif
 #endif
   } 
   else if (th->stack!=NULL) {
@@ -596,8 +598,11 @@ void CthPupBase(pup_er p,CthThreadBase *t,int useMigratable)
 #elif CMK_THREADS_USE_STACKCOPY
     /* do nothing */
 #else /* isomalloc */
-    //         CmiIsomallocPup(p,&t->stack);
+#if USE_MEMPOOL_ISOMALLOC
     pup_bytes(p,&t->stack,sizeof(char*));
+#else
+    CmiIsomallocPup(p,&t->stack);
+#endif
 #endif
   } 
   else {
@@ -618,11 +623,14 @@ void CthPupBase(pup_er p,CthThreadBase *t,int useMigratable)
   pup_bytes(p, &t->tlsseg, sizeof(tlsseg_t));
   aux = ((void*)(t->tlsseg.memseg)) - t->tlsseg.size;
   /* fixme: tls global variables handling needs isomalloc */
-  //CmiIsomallocPup(p, &aux);
+#if USE_MEMPOOL_ISOMALLOC
   pup_bytes(p,&aux,sizeof(char*));
+#else
+  CmiIsomallocPup(p, &aux);
+#endif
   /* printf("[%d] %s %p\n", CmiMyPe(), pup_typeString(p), t->tlsseg.memseg); */
 #endif
-
+#endif
 }
 
 static void CthThreadFinished(CthThread t)