-/* Copyright (c) 2015-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
static void smpi_get_executable_global_size()
{
char buffer[PATH_MAX];
- char* full_name = realpath(xbt_binary_name, buffer);
- xbt_assert(full_name != nullptr, "Could not resolve real path of binary file '%s'", xbt_binary_name);
+ const char* full_name = realpath(simgrid::xbt::binary_name.c_str(), buffer);
+ xbt_assert(full_name != nullptr, "Could not resolve real path of binary file '%s'",
+ simgrid::xbt::binary_name.c_str());
std::vector<simgrid::xbt::VmMap> map = simgrid::xbt::get_memory_map(getpid());
for (auto i = map.begin(); i != map.end() ; ++i) {
#if HAVE_PRIVATIZATION
// FIXME, cross-process support (mmap across process when necessary)
XBT_DEBUG("Switching data frame to the one of process %ld", actor->get_pid());
- simgrid::smpi::ActorExt* process = smpi_process_remote(actor);
+ const simgrid::smpi::ActorExt* process = smpi_process_remote(actor);
int current = process->privatized_region()->file_descriptor;
- void* tmp = mmap(TOPAGE(smpi_data_exe_start), smpi_data_exe_size, PROT_RW, MAP_FIXED | MAP_SHARED, current, 0);
+ const void* tmp = mmap(TOPAGE(smpi_data_exe_start), smpi_data_exe_size, PROT_RW, MAP_FIXED | MAP_SHARED, current, 0);
if (tmp != TOPAGE(smpi_data_exe_start))
xbt_die("Couldn't map the new region (errno %d): %s", errno, strerror(errno));
smpi_loaded_page = actor->get_pid();