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
Fix a bug
[simgrid.git]
/
src
/
surf
/
surf_routing_full.cpp
diff --git
a/src/surf/surf_routing_full.cpp
b/src/surf/surf_routing_full.cpp
index
814aba7
..
02a5168
100644
(file)
--- a/
src/surf/surf_routing_full.cpp
+++ b/
src/surf/surf_routing_full.cpp
@@
-5,11
+5,9
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_routing_full.hpp"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_routing_full.hpp"
-#include "network.hpp"
+#include "network
_interface
.hpp"
-extern "C" {
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
-}
/* Global vars */
extern routing_platf_t routing_platf;
/* Global vars */
extern routing_platf_t routing_platf;
@@
-60,8
+58,12
@@
AsFull::~AsFull(){
int i, j;
/* Delete routing table */
for (i = 0; i < table_size; i++)
int i, j;
/* Delete routing table */
for (i = 0; i < table_size; i++)
- for (j = 0; j < table_size; j++)
- delete TO_ROUTE_FULL(i,j);
+ for (j = 0; j < table_size; j++) {
+ if (TO_ROUTE_FULL(i,j)){
+ xbt_dynar_free(&TO_ROUTE_FULL(i,j)->link_list);
+ xbt_free(TO_ROUTE_FULL(i,j));
+ }
+ }
xbt_free(p_routingTable);
}
xbt_free(p_routingTable);
}
@@
-123,7
+125,7
@@
void AsFull::getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf
xbt_dynar_foreach(e_route->link_list, cpt, link) {
xbt_dynar_push(res->link_list, &link);
if (lat)
xbt_dynar_foreach(e_route->link_list, cpt, link) {
xbt_dynar_push(res->link_list, &link);
if (lat)
- *lat +=
dynamic_cast<NetworkCm02LinkPtr>(static_cast<ResourcePtr>(link)
)->getLatency();
+ *lat +=
static_cast<NetworkLinkPtr>(link
)->getLatency();
}
}
}
}
}
}