[MOAB-dev] r4358 - MOAB/trunk/tools/mbcoupler

acaceres at mcs.anl.gov acaceres at mcs.anl.gov
Mon Dec 13 13:08:57 CST 2010


Author: acaceres
Date: 2010-12-13 13:08:57 -0600 (Mon, 13 Dec 2010)
New Revision: 4358

Modified:
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
Log:
memory management bug


Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp	2010-12-13 19:06:57 UTC (rev 4357)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp	2010-12-13 19:08:57 UTC (rev 4358)
@@ -310,9 +310,15 @@
     // if we didn't find any ents and we're looking locally, nothing more to do
   if (entities.empty()){
     if(tl){
-      tl->vi[3*index] = from_proc;
-      tl->vi[3*index+1] = remote_index;
-      tl->vi[3*index+2] = -1;
+
+      if (tl->n == tl->max)
+	tuple_list_grow(tl);
+
+      tl->vi[3*tl->n] = from_proc;
+      tl->vi[3*tl->n+1] = remote_index;
+      tl->vi[3*tl->n+2] = -1;
+      tl->n++;
+
     }
     point_located = false;
     return MB_SUCCESS;






























More information about the moab-dev mailing list