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
Memleaks fixes on VM
[simgrid.git]
/
src
/
surf
/
cpu_interface.cpp
diff --git
a/src/surf/cpu_interface.cpp
b/src/surf/cpu_interface.cpp
index
b26d58b
..
b496745
100644
(file)
--- a/
src/surf/cpu_interface.cpp
+++ b/
src/surf/cpu_interface.cpp
@@
-149,13
+149,14
@@
Cpu::Cpu(ModelPtr model, const char *name, xbt_dict_t props,
}
Cpu::~Cpu(){
}
Cpu::~Cpu(){
- if (
getModel()->getUpdateMechanism() != UM_UNDEFINED
){
+ if (
p_constraintCoreId
){
for (int i = 0; i < m_core; i++) {
xbt_free(p_constraintCoreId[i]);
}
xbt_free(p_constraintCore);
for (int i = 0; i < m_core; i++) {
xbt_free(p_constraintCoreId[i]);
}
xbt_free(p_constraintCore);
- xbt_free(p_constraintCoreId);
}
}
+ if (p_constraintCoreId)
+ xbt_free(p_constraintCoreId);
}
double Cpu::getSpeed(double load)
}
double Cpu::getSpeed(double load)