/* 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. */
/* 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. */
#include "src/mc/mc_mmu.hpp"
#include "src/mc/sosp/PageStore.hpp"
#include <cstring> // memcpy, memcmp
#include <unistd.h>
#include "src/mc/mc_mmu.hpp"
#include "src/mc/sosp/PageStore.hpp"
#include <cstring> // memcpy, memcmp
#include <unistd.h>
MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0);
xbt_assert(new_memory != MAP_FAILED, "Could not mremap snapshot pages.");
// Check if expanding worked
MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0);
xbt_assert(new_memory != MAP_FAILED, "Could not mremap snapshot pages.");
// Check if expanding worked
// New memory segment could not be put at the end of this->memory_,
// so cancel this one and try to relocate everything and copy data
munmap(new_memory, new_bytesize - old_bytesize);
// New memory segment could not be put at the end of this->memory_,
// so cancel this one and try to relocate everything and copy data
munmap(new_memory, new_bytesize - old_bytesize);