And one more mem leak patch for callmodule subtasking. Should have
been in my original patch (Re: "DX callmodule task group bug/patch"), but I
didn't for MLKs.
Randall
--
Randall Hopper (mailto:[EMAIL PROTECTED])
EPA Scientific Visualization Center
US EPA MD/24 ERC-1A; RTP, NC 27711
--- src/exec/libdx/NEW.1/task.c Wed Aug 23 19:37:33 2000
+++ src/exec/libdx/task.c Wed Aug 23 20:57:09 2000
@@ -288,10 +288,13 @@
if (ti->ntasks) { /* are there more sorted tasks? */
ti->ntasks -= 1; /* yes, remove it */
t = &(ti->tasks[ti->ntasks]); /* get the next task */
+ delete = 0; /* master tasks do not get deleted */
} else if (ti->first) { /* are there more extra tasks */
DXlock(&ti->extra_lock, 0); /* DXlock the queue */
t = ti->first; /* get the next one */
ti->first = t->next; /* remove from queue */
+ if (ti->last == t)
+ ti->last = NULL;
DXunlock(&ti->extra_lock, 0); /* DXunlock the queue */
delete = 1; /* remember to delete it */
}
@@ -305,6 +308,8 @@
if (t->size) /* if we allocated the arg block, */
DXFree(t->arg); /* free it */
+ if (delete) /* if we allocated the task
block, */
+ DXFree(t); /* free it */
DXsyncmem(); /* make sure we're in sync */
DXlock(&(ti->undone_lock), id); /* DXlock the undone count */