Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Store this size in a fixed sized, as potentially this could overflow
authordegomme <augustin.degomme@unibas.ch>
Wed, 15 Feb 2017 01:07:06 +0000 (02:07 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Wed, 15 Feb 2017 01:07:59 +0000 (02:07 +0100)
src/smpi/private.h
src/smpi/smpi_bench.cpp

index a2c1256..b2ea681 100644 (file)
@@ -412,7 +412,7 @@ extern XBT_PRIVATE double smpi_cpu_threshold;
 extern XBT_PRIVATE double smpi_host_speed;
 extern XBT_PRIVATE bool smpi_privatize_global_variables;
 extern XBT_PRIVATE char* smpi_start_data_exe; //start of the data+bss segment of the executable
 extern XBT_PRIVATE double smpi_host_speed;
 extern XBT_PRIVATE bool smpi_privatize_global_variables;
 extern XBT_PRIVATE char* smpi_start_data_exe; //start of the data+bss segment of the executable
-extern XBT_PRIVATE int smpi_size_data_exe; //size of the data+bss segment of the executable
+extern XBT_PRIVATE uint64_t smpi_size_data_exe; //size of the data+bss segment of the executable
 
 XBT_PRIVATE void smpi_switch_data_segment(int dest);
 XBT_PRIVATE void smpi_really_switch_data_segment(int dest);
 
 XBT_PRIVATE void smpi_switch_data_segment(int dest);
 XBT_PRIVATE void smpi_really_switch_data_segment(int dest);
index a4f0521..41171c4 100644 (file)
@@ -83,7 +83,7 @@ double smpi_host_speed;
 
 int smpi_loaded_page = -1;
 char* smpi_start_data_exe = nullptr;
 
 int smpi_loaded_page = -1;
 char* smpi_start_data_exe = nullptr;
-int smpi_size_data_exe = 0;
+uint64_t smpi_size_data_exe = 0;
 bool smpi_privatize_global_variables;
 double smpi_total_benched_time = 0;
 smpi_privatisation_region_t smpi_privatisation_regions;
 bool smpi_privatize_global_variables;
 double smpi_total_benched_time = 0;
 smpi_privatisation_region_t smpi_privatisation_regions;
@@ -730,7 +730,7 @@ void smpi_initialize_global_memory_segments()
 
   smpi_get_executable_global_size();
 
 
   smpi_get_executable_global_size();
 
-  XBT_DEBUG ("bss+data segment found : size %d starting at %p", smpi_size_data_exe, smpi_start_data_exe );
+  XBT_DEBUG ("bss+data segment found : size %zu starting at %p", smpi_size_data_exe, smpi_start_data_exe );
 
   if (smpi_size_data_exe == 0){//no need to switch
     smpi_privatize_global_variables=false;
 
   if (smpi_size_data_exe == 0){//no need to switch
     smpi_privatize_global_variables=false;