-#include <unistd.h> // pread, pwrite
-
-#include "PageStore.hpp"
-#include "mc_mmu.h"
-#include "mc_private.h"
-#include "mc_snapshot.h"
-
-#include <xbt/mmalloc.h>
-
-extern "C" {
-
-// ***** Region management:
-
-/** @brief Take a per-page snapshot of a region
- *
- * @param data The start of the region (must be at the beginning of a page)
- * @param pag_count Number of pages of the region
- * @return Snapshot page numbers of this new snapshot
- */
-size_t* mc_take_page_snapshot_region(mc_process_t process,
- void* data, size_t page_count)
-{
- size_t* pagenos = (size_t*) malloc(page_count * sizeof(size_t));
-
- const bool is_self = MC_process_is_self(process);
-
- void* temp = NULL;
- if (!is_self)
- temp = malloc(xbt_pagesize);