X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cf07616d00639f39bad49729f9e63b7533eed9a4..bc0e9c9ecdf8b93f139978e522433f0a9fdcdedd:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 139683d24d..4b239744c4 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -1,3 +1,4 @@ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -206,6 +207,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster) xbt_dict_foreach(cluster->properties,cursor,key,data) { xbt_dict_set(host.properties, key, xbt_strdup(data), nullptr); } + xbt_dict_free(&cluster->properties); } host.speed_per_pstate = cluster->speeds; @@ -425,12 +427,6 @@ void sg_platf_new_storage_type(sg_platf_storage_type_cbarg_t storage_type){ (void *) stype); } -static void mount_free(void *p) -{ - mount_t mnt = (mount_t) p; - xbt_free(mnt->name); -} - void sg_platf_new_mount(sg_platf_mount_cbarg_t mount){ xbt_assert(xbt_lib_get_or_null(storage_lib, mount->storageId, ROUTING_STORAGE_LEVEL), "Cannot mount non-existent disk \"%s\"", mount->storageId); @@ -681,7 +677,7 @@ simgrid::s4u::NetZone* sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS) if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset) current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::recursive; /* add to the sons dictionary */ - xbt_dict_set(current_routing->children(), AS->id, (void *) new_as, nullptr); + current_routing->children()->push_back(static_cast(new_as)); } /* set the new current component of the tree */