Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leaks analysis : activate if list-leaks is asked manually (without smpi/display-alloc...
[simgrid.git] / src / smpi / internals / smpi_config.cpp
index 2733ecd..d38ea1b 100644 (file)
@@ -118,9 +118,17 @@ simgrid::config::Flag<std::string> _smpi_cfg_comp_adjustment_file{"smpi/comp-adj
 #endif
 
 simgrid::config::Flag<double> _smpi_cfg_auto_shared_malloc_thresh("smpi/auto-shared-malloc-thresh",
-                                                                  "Threshold size for the automatic sharing of memory", 
+                                                                  "Threshold size for the automatic sharing of memory",
                                                                   0);
 
+simgrid::config::Flag<bool> _smpi_cfg_display_alloc("smpi/display-allocs",
+                                                    "Whether we should display a memory allocations analysis after simulation.",
+                                                     false);
+
+simgrid::config::Flag<int> _smpi_cfg_list_leaks("smpi/list-leaks",
+                                                "Whether we should display the n first MPI handle leaks (addresses and type only) after simulation",
+                                                -1);
+
 double smpi_cfg_host_speed(){
   return _smpi_cfg_host_speed;
 }
@@ -165,6 +173,10 @@ bool smpi_cfg_trace_call_use_absolute_path(){
   return _smpi_cfg_trace_call_use_absolute_path;
 }
 
+bool smpi_cfg_display_alloc(){
+  return _smpi_cfg_list_leaks != -1 ? true : _smpi_cfg_display_alloc;
+}
+
 std::string smpi_cfg_comp_adjustment_file(){
   return _smpi_cfg_comp_adjustment_file;
 }