X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3b7e5f4b4d7c87ee3e8827313ec966ea8fc8387..50753d5f8442a47c17c4035724201a18a7ff6146:/src/mc/sosp/Region.hpp diff --git a/src/mc/sosp/Region.hpp b/src/mc/sosp/Region.hpp index 62d13c3f1a..7ab26e2de9 100644 --- a/src/mc/sosp/Region.hpp +++ b/src/mc/sosp/Region.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2023. 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. */ @@ -12,8 +12,7 @@ #include #include -namespace simgrid { -namespace mc { +namespace simgrid::mc { enum class RegionType { Heap = 1, Data = 2 }; @@ -36,8 +35,7 @@ private: ChunkedData chunks_; public: - Region(RegionType type, void* start_addr, size_t size); - ~Region() = default; + Region(PageStore& store, const RemoteProcessMemory& memory, RegionType type, void* start_addr, size_t size); Region(Region const&) = delete; Region& operator=(Region const&) = delete; Region(Region&& that) = delete; @@ -60,7 +58,7 @@ public: bool contain(RemotePtr p) const { return p >= start() && p < end(); } /** @brief Restore a region from a snapshot */ - void restore() const; + void restore(const RemoteProcessMemory& memory) const; /** @brief Read memory that was snapshotted in this region * @@ -72,8 +70,7 @@ public: void* read(void* target, const void* addr, std::size_t size) const; }; -} // namespace mc -} // namespace simgrid +} // namespace simgrid::mc int MC_snapshot_region_memcmp(const void* addr1, const simgrid::mc::Region* region1, const void* addr2, const simgrid::mc::Region* region2, std::size_t size);