Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / mc / sosp / PageStore.cpp
index 5126851e5780c92e9f4eb6cb31f7990bb14ee645..149e36dc0b16d06f928ab6643237a5b82ebd2cef 100644 (file)
@@ -50,7 +50,7 @@ static XBT_ALWAYS_INLINE PageStore::hash_type mc_hash_page(const void* data)
 
 // ***** snapshot_page_manager
 
-PageStore::PageStore(std::size_t size) : memory_(nullptr), capacity_(size), top_index_(0)
+PageStore::PageStore(std::size_t size) : capacity_(size)
 {
   // Using mmap in order to be able to expand the region by relocating it somewhere else in the virtual memory space:
   void* memory =
@@ -166,7 +166,7 @@ std::size_t PageStore::store_page(void* page)
   // Otherwise, a new page is allocated in the page store and the content of the page is `memcpy()`-ed to this new page.
   std::size_t pageno = alloc_page();
   xbt_assert(this->page_counts_[pageno] == 0, "Allocated page is already used");
-  void* snapshot_page = (void*)this->get_page(pageno);
+  void* snapshot_page = this->get_page(pageno);
   memcpy(snapshot_page, page, xbt_pagesize);
   page_set.insert(pageno);
   page_counts_[pageno]++;