A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correctly destroy the MSG_host object of a VM
[simgrid.git]
/
src
/
msg
/
msg_host.c
diff --git
a/src/msg/msg_host.c
b/src/msg/msg_host.c
index 5a0de0d55af84dae712bf9fd946d75aa83125824..52b25ae74309e2acd22431f95d6ab03dc8237f57 100644
(file)
--- a/
src/msg/msg_host.c
+++ b/
src/msg/msg_host.c
@@
-112,21
+112,30
@@
msg_host_t MSG_host_self(void)
}
/*
}
/*
- * \brief
Destroys
a host (internal call only)
+ * \brief
Frees private data of
a host (internal call only)
*/
*/
-void __MSG_host_
destroy(msg_host_priv_t host) {
-
+void __MSG_host_
priv_free(msg_host_priv_t priv)
+{
#ifdef MSG_USE_DEPRECATED
if (msg_global->max_channel > 0)
#ifdef MSG_USE_DEPRECATED
if (msg_global->max_channel > 0)
- free(
host
->mailboxes);
+ free(
priv
->mailboxes);
#endif
#endif
+ free(priv);
+}
+
+/*
+ * \brief Destroys a host (internal call only)
+ */
+void __MSG_host_destroy(msg_host_t host)
+{
+ const char *name = MSG_host_get_name(host);
/* TODO:
* What happens if VMs still remain on this host?
* Revisit here after the surf layer gets stable.
**/
/* TODO:
* What happens if VMs still remain on this host?
* Revisit here after the surf layer gets stable.
**/
-
free(host
);
+
xbt_lib_unset(host_lib, name, MSG_HOST_LEVEL, 1
);
}
/** \ingroup m_host_management
}
/** \ingroup m_host_management