xbt_assert(fdflags != -1 && fcntl(socket, F_SETFD, fdflags & ~FD_CLOEXEC) != -1,
"Could not remove CLOEXEC for socket");
- // Set environment so that mmalloc gets used in application
- setenv(MC_ENV_VARIABLE, "1", 1);
-
// Disable lazy relocation in the model-checked process to prevent the application from
// modifying its .got.plt during snapshot.
setenv("LC_BIND_NOW", "1", 1);
// ***** Environment variables for passing context to the model-checked process
-/** Environment variable name set by `simgrid-mc` to enable MC support in the
- * children MC processes
+/** Environment variable name used to pass the communication socket.
+ *
+ * It is set by `simgrid-mc` to enable MC support in the children processes
*/
-#define MC_ENV_VARIABLE "SIMGRID_MC"
-
-/** Environment variable name used to pass the communication socket */
#define MC_ENV_SOCKET_FD "SIMGRID_MC_SOCKET_FD"
// ***** Messages
if (mm_initialized)
return;
mm_initializing = 1;
- __malloc_use_mmalloc = getenv(MC_ENV_VARIABLE) ? 1 : 0;
+ __malloc_use_mmalloc = getenv(MC_ENV_SOCKET_FD) ? 1 : 0;
if (__malloc_use_mmalloc) {
__mmalloc_current_heap = mmalloc_preinit();
} else {