Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
free the libdata fabrics on exit (actually call the exit function of each libdata)
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 23 Jun 2005 14:43:13 +0000 (14:43 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 23 Jun 2005 14:43:13 +0000 (14:43 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1384 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Virtu/process.c

index 4233436..31732a3 100644 (file)
@@ -112,7 +112,14 @@ gras_procdata_init() {
 
 void
 gras_procdata_exit() {
+  int len;
   gras_procdata_t *pd=gras_procdata_get();
 
   xbt_dict_free(&( pd->libdata ));
+  
+  /* Remove procdata in reverse order wrt creation */
+  while ((len=xbt_dynar_length(_gras_procdata_fabrics))) {
+    xbt_dynar_remove_at(_gras_procdata_fabrics,len-1,NULL);
+  }
+  xbt_dynar_free( & _gras_procdata_fabrics );
 }