Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove unused declarations
[simgrid.git] / src / mc / PageStore.hpp
index 4e2e53e..979e02f 100644 (file)
@@ -15,8 +15,8 @@
 
 #include <xbt/base.h>
 
-#include "mc_mmu.h"
-#include "mc_forward.hpp"
+#include "src/mc/mc_mmu.h"
+#include "src/mc/mc_forward.hpp"
 
 namespace simgrid {
 namespace mc {
@@ -24,9 +24,9 @@ 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
+ * store: its responsibility is to store immutable shareable
+ * reference-counted memory pages independently of the snapshotting
+ * logic. Snapshot management and representation is
  * handled to an higher layer. READMORE
  *
  * Data structure:
@@ -131,10 +131,10 @@ public: // Methods
    * changed since the previous cnapshot/restoration and we can avoid
    * hashing the page, comparing byte-per-byte to candidates.
    * */
-  void ref_page(std::size_t pageno);
+  void ref_page(size_t pageno);
 
   /** @brief Store a page in the page store */
-  size_t store_page(void* page);
+  std::size_t store_page(void* page);
 
   /** @brief Get a page from its page number
    *
@@ -174,7 +174,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))
@@ -184,7 +184,7 @@ std::size_t PageStore::get_ref(std::size_t pageno)
 }
 
 inline __attribute__((always_inline))
-size_t PageStore::size() {
+std::size_t PageStore::size() {
   return this->top_index_ - this->free_pages_.size();
 }