X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6745fb7d436ba5078b560acf5c8164bf422a1e16..1121b10030be7b3e1e8248d9deec221e3bd1cf4e:/examples/s4u/io-file-remote/s4u-io-file-remote.cpp diff --git a/examples/s4u/io-file-remote/s4u-io-file-remote.cpp b/examples/s4u/io-file-remote/s4u-io-file-remote.cpp index af61362b93..13b59de07d 100644 --- a/examples/s4u/io-file-remote/s4u-io-file-remote.cpp +++ b/examples/s4u/io-file-remote/s4u-io-file-remote.cpp @@ -58,19 +58,21 @@ int main(int argc, char** argv) e.loadPlatform(argv[1]); e.registerFunction("host", host); e.loadDeployment(argv[2]); + std::map* allStorages = simgrid::s4u::allStorages(); - for (auto const& s : *simgrid::s4u::allStorages()) { + for (auto const& s : *allStorages) { XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s.second) / INMEGA, sg_storage_get_size_free(s.second) / INMEGA, s.second->getCname()); } e.run(); - for (auto const& s : *simgrid::s4u::allStorages()) { + for (auto const& s : *allStorages) { XBT_INFO("End: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s.second) / INMEGA, sg_storage_get_size_free(s.second) / INMEGA, s.second->getCname()); } + delete allStorages; XBT_INFO("Simulation time %g", simgrid::s4u::Engine::getClock()); return 0; }