- if((smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) && (static_cast<char*>(buff) >= smpi_start_data_exe)
- && (static_cast<char*>(buff) < smpi_start_data_exe + smpi_size_data_exe )
- ){
- XBT_DEBUG("Privatization : We are copying from a zone inside global memory... Saving data to temp buffer !");
-
- smpi_switch_data_segment(
- static_cast<simgrid::smpi::Process*>((static_cast<simgrid::msg::ActorExt*>(comm->src_proc->userdata)->data))
- ->index());
- tmpbuff = static_cast<void*>(xbt_malloc(buff_size));
- memcpy_private(tmpbuff, buff, private_blocks);
+ if ((smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) && (static_cast<char*>(buff) >= smpi_data_exe_start) &&
+ (static_cast<char*>(buff) < smpi_data_exe_start + smpi_data_exe_size)) {
+ XBT_DEBUG("Privatization : We are copying from a zone inside global memory... Saving data to temp buffer !");
+
+ smpi_switch_data_segment(
+ static_cast<simgrid::smpi::Process*>((static_cast<simgrid::msg::ActorExt*>(comm->src_proc->userdata)->data))
+ ->index());
+ tmpbuff = static_cast<void*>(xbt_malloc(buff_size));
+ memcpy_private(tmpbuff, buff, private_blocks);