X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bde09a7b53c62986d6f22b10de50dec039b4f96a..697e7bf5e65bce115783c6debcded0cf6f14744d:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 18620ac064..2ff3eb33c1 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2021. 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. */ @@ -33,9 +33,6 @@ std::vector all_existing_models; /* to destro simgrid::kernel::profile::FutureEvtSet future_evt_set; std::vector surf_path; -/** set of hosts for which one want to be notified if they ever restart. */ -std::set watched_hosts; -extern std::map storage_types; std::vector* surf_plugin_description = nullptr; @@ -115,10 +112,6 @@ const std::vector surf_disk_model_description = { {"default", "Simplistic disk model.", &surf_disk_model_init_default}, }; -const std::vector surf_storage_model_description = { - {"default", "Simplistic storage model.", &surf_storage_model_init_default}, -}; - double NOW = 0; double surf_get_clock() @@ -126,7 +119,7 @@ double surf_get_clock() return NOW; } -/* returns whether #file_path is a absolute file path. Surprising, isn't it ? */ +/* returns whether #file_path is an absolute file path. Surprising, isn't it ? */ static bool is_absolute_file_path(const std::string& file_path) { #ifdef _WIN32 @@ -147,7 +140,7 @@ std::ifstream* surf_ifsopen(const std::string& name) { xbt_assert(not name.empty()); - std::ifstream* fs = new std::ifstream(); + auto* fs = new std::ifstream(); if (is_absolute_file_path(name)) { /* don't mess with absolute file names */ fs->open(name.c_str(), std::ifstream::in); } @@ -197,7 +190,7 @@ int find_model_description(const std::vector& table, c auto pos = std::find_if(table.begin(), table.end(), [&name](const surf_model_description_t& item) { return item.name == name; }); if (pos != table.end()) - return std::distance(table.begin(), pos); + return static_cast(std::distance(table.begin(), pos)); if (table.empty()) xbt_die("No model is valid! This is a bug."); @@ -222,20 +215,11 @@ void surf_init(int *argc, char **argv) xbt_init(argc, argv); sg_config_init(argc, argv); - - if (MC_is_active()) - MC_memory_init(); } void surf_exit() { simgrid::s4u::Engine::shutdown(); - for (auto const& e : storage_types) { - const simgrid::kernel::resource::StorageType* stype = e.second; - delete stype->properties; - delete stype->model_properties; - delete stype; - } for (auto const& model : all_existing_models) delete model;