Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add support for huge pages in shared malloc.
[simgrid.git] / src / simgrid / sg_config.cpp
index f1434ef..6de9f2f 100644 (file)
@@ -45,7 +45,8 @@ int _sg_cfg_exit_asap = 0;
 static void sg_config_cmd_line(int *argc, char **argv)
 {
   int shall_exit = 0;
-  int i, j;
+  int i;
+  int j;
 
   for (j = i = 1; i < *argc; i++) {
     if (!strncmp(argv[i], "--cfg=", strlen("--cfg="))) {
@@ -485,6 +486,8 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register_alias("smpi/shared-malloc", "smpi/use-shared-malloc");
     xbt_cfg_register_alias("smpi/shared-malloc", "smpi/use_shared_malloc");
     xbt_cfg_register_double("smpi/shared-malloc-blocksize", 1UL << 20, nullptr, "Size of the bogus file which will be created for global shared allocations");
+    xbt_cfg_register_string("smpi/shared-malloc-hugepage", "", nullptr,
+                            "Path to a mounted hugetlbfs, to use huge pages with shared malloc.");
 
     xbt_cfg_register_double("smpi/cpu-threshold", 1e-6, nullptr, "Minimal computation time (in seconds) not discarded, or -1 for infinity.");
     xbt_cfg_register_alias("smpi/cpu-threshold", "smpi/cpu_threshold");