added a CqsDelete(Queue) to free the memory.
authorGengbin Zheng <gzheng@illinois.edu>
Sun, 28 Dec 2003 21:57:14 +0000 (21:57 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Sun, 28 Dec 2003 21:57:14 +0000 (21:57 +0000)
src/conv-core/queueing.c
src/conv-core/queueing.h

index a781193a4c7cc2ed9d4b87945c9a2d0954901533..e729c041754252cb5c26c6214d6c186d379672bc 100644 (file)
@@ -239,6 +239,13 @@ Queue CqsCreate(void)
   return q;
 }
 
+void CqsDelete(Queue q)
+{
+  CmiFree(q->negprioq.heap);
+  CmiFree(q->posprioq.heap);
+  CmiFree(q);
+}
+
 unsigned int CqsLength(Queue q)
 {
   return q->length;
index 2d32907732b8a244744d6a5317e67001b2e91751..c88f2adf1299efc5b27e0c6f8650772cb8fef34d 100644 (file)
@@ -64,6 +64,7 @@ typedef struct Queue_struct
 *Queue;
 
 Queue CqsCreate(void);
+void CqsDelete(Queue);
 void CqsEnqueue(Queue, void *msg);
 void CqsEnqueueFifo(Queue, void *msg);
 void CqsEnqueueLifo(Queue, void *msg);