really bad bug
authorbdemsky <bdemsky>
Tue, 26 Oct 2010 22:32:23 +0000 (22:32 +0000)
committerbdemsky <bdemsky>
Tue, 26 Oct 2010 22:32:23 +0000 (22:32 +0000)
Robust/src/Runtime/mlp_runtime.h

index 1512bdb8c7e85884778298578fe86344be366a97..da272560fd954170791d2b7cc033d650511d097c 100644 (file)
@@ -274,12 +274,12 @@ static inline void RELEASE_REFERENCE_TO( SESEcommon* seseRec ) {
 
 static MemPool* taskpoolcreate( int itemSize ) {
   MemPool* p    = RUNMALLOC( sizeof( MemPool ) );
-  SESEcommon *c = (SESEcommon *) p;
+  SESEcommon *c = (SESEcommon *) RUNMALLOC(itemSize);
   pthread_cond_init( &(c->runningChildrenCond), NULL );
   pthread_mutex_init( &(c->lock), NULL );
 
   p->itemSize   = itemSize;
-  p->head       = RUNMALLOC( itemSize );
+  p->head       = (void *)c;
   p->head->next = NULL;
   p->tail       = p->head;
   return p;