couple of minor bug fixes
authorjjenista <jjenista>
Tue, 26 Oct 2010 18:17:14 +0000 (18:17 +0000)
committerjjenista <jjenista>
Tue, 26 Oct 2010 18:17:14 +0000 (18:17 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/mlp_runtime.h

index bdaec07ac9aa688a3de714fa2751e99005cc0d90..f309ad5bdba001c89525e78b0a0e30c83d1b179e 100644 (file)
@@ -4212,12 +4212,12 @@ public class BuildCode {
                                      + waitingElement
                                      .getDynID()
                                      + ";");
-                      output.println("       rentry=mlpCreateFineREntry("
+                      output.println("       rentry=mlpCreateFineREntry(runningSESE->memoryQueueArray["+ queueID+ "],"
                                      + waitingElement.getStatus()
                                      + ", &(seseToIssue->common),  pointer );");
                     }
                   } else {
-                    output.println("       rentry=mlpCreateFineREntry("
+                    output.println("       rentry=mlpCreateFineREntry(runningSESE->memoryQueueArray["+ queueID+ "],"
                                    + waitingElement.getStatus()
                                    + ", &(seseToIssue->common), (void*)&seseToIssue->"
                                    + waitingElement.getDynID()
@@ -4327,7 +4327,7 @@ public class BuildCode {
                                  .getDynID()
                                  + ";");
                       output
-                        .println("     rentry=mlpCreateFineREntry("
+                        .println("     rentry=mlpCreateFineREntry(runningSESE->memoryQueueArray["+ queueID+ "],"
                                  + waitingElement
                                  .getStatus()
                                  + ", &(seseToIssue->common),  pointer );");
@@ -4335,7 +4335,7 @@ public class BuildCode {
                     }
                   } else {
                     output
-                      .println("     rentry=mlpCreateFineREntry("
+                      .println("     rentry=mlpCreateFineREntry(runningSESE->memoryQueueArray["+ queueID+ "],"
                                + waitingElement
                                .getStatus()
                                + ", &(seseToIssue->common),  (void*)&seseToIssue->"
index 02ec3c89bdfff730f2775b04b68da1f280b8b34c..1512bdb8c7e85884778298578fe86344be366a97 100644 (file)
@@ -3,6 +3,8 @@
 
 
 #include <pthread.h>
+#include "runtime.h"
+#include "mem.h"
 #include "Queue.h"
 #include "psemaphore.h"
 #include "mlp_lock.h"
@@ -271,13 +273,13 @@ static inline void RELEASE_REFERENCE_TO( SESEcommon* seseRec ) {
 }
 
 static MemPool* taskpoolcreate( int itemSize ) {
-  MemPool* p    = RUNMALLOC( 1, sizeof( MemPool ) );
+  MemPool* p    = RUNMALLOC( sizeof( MemPool ) );
   SESEcommon *c = (SESEcommon *) p;
   pthread_cond_init( &(c->runningChildrenCond), NULL );
   pthread_mutex_init( &(c->lock), NULL );
 
   p->itemSize   = itemSize;
-  p->head       = RUNMALLOC( 1, itemSize );
+  p->head       = RUNMALLOC( itemSize );
   p->head->next = NULL;
   p->tail       = p->head;
   return p;