Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix
[simgrid.git] / src / mc / PageStore.hpp
index 8ed78ad..4226ffd 100644 (file)
@@ -23,11 +23,10 @@ namespace mc {
 
 /** @brief Storage for snapshot memory pages
  *
- * The first (lower) layer of the per-page snapshot mechanism is a page
- * store: it's responsibility is to store immutable shareable
- * reference-counted memory pages independently of the snapshoting
- * logic. Snapshot management and representation, soft-dirty tracking is
- * handled to an higher layer. READMORE
+ * The first (lower) layer of the per-page snapshot mechanism is a page store:
+ * its responsibility is to store immutable sharable reference-counted memory
+ * pages independently of the snapshotting logic. Snapshot management and
+ * representation is handled to an higher layer. READMORE
  *
  * Data structure:
  *
@@ -112,8 +111,7 @@ public: // Methods
 
   /** @brief Decrement the reference count for a given page
    *
-   * Decrement the reference count of this page. Used when a snapshot is
-   * destroyed.
+   * Decrement the reference count of this page. Used when a snapshot is destroyed.
    *
    * If the reference count reaches zero, the page is recycled:
    * it is added to the `free_pages_` list and removed from the `hash_index_`.
@@ -174,7 +172,7 @@ void PageStore::ref_page(size_t pageno)
 inline __attribute__((always_inline))
 const void* PageStore::get_page(std::size_t pageno) const
 {
-  return mc_page_from_number(this->memory_, pageno);
+  return (void*) simgrid::mc::mmu::join(pageno, (std::uintptr_t) this->memory_);
 }
 
 inline __attribute__((always_inline))