X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/71980d9754a6693a769dce2f1e55d92103b46b5e..36fa571a13985879dc627c70ecc2340af606aa42:/src/smpi/smpi_memory.cpp diff --git a/src/smpi/smpi_memory.cpp b/src/smpi/smpi_memory.cpp index eb6a52bddf..934885afa7 100644 --- a/src/smpi/smpi_memory.cpp +++ b/src/smpi/smpi_memory.cpp @@ -27,7 +27,7 @@ static const int PROT_RWX = (PROT_READ | PROT_WRITE | PROT_EXEC); static const int PROT_RW = (PROT_READ | PROT_WRITE ); XBT_ATTRIB_UNUSED static const int PROT_RX = (PROT_READ | PROT_EXEC ); -void smpi_get_executable_global_size(void) +void smpi_get_executable_global_size() { char buffer[PATH_MAX]; char* full_name = realpath(xbt_binary_name, buffer); @@ -48,8 +48,8 @@ void smpi_get_executable_global_size(void) following the rw- area is the end of the data segment. It would be better to check with the size of the data segment. */ if (i != map.end() && i->pathname.empty() && (i->prot & PROT_RWX) == PROT_RW - && i->start_addr == (std::uint64_t) smpi_start_data_exe + smpi_size_data_exe) { - smpi_size_data_exe = i->end_addr - (std::uint64_t) smpi_start_data_exe; + && (char*)i->start_addr == smpi_start_data_exe + smpi_size_data_exe) { + smpi_size_data_exe = (char*)i->end_addr - smpi_start_data_exe; } return; }