Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Spell check.
[simgrid.git] / src / mc / sosp / Snapshot.cpp
index bc72a2b..2f50339 100644 (file)
@@ -217,8 +217,7 @@ Snapshot::Snapshot(int num_state, RemoteClient* process)
 
   if (_sg_mc_max_visited_states > 0 || not _sg_mc_property_file.get().empty()) {
     snapshot_stacks(process);
-    if (_sg_mc_hash)
-      hash_ = simgrid::mc::hash(*this);
+    hash_ = simgrid::mc::hash(*this);
   }
 
   snapshot_ignore_restore(this);
@@ -236,11 +235,11 @@ void Snapshot::add_region(RegionType type, ObjectInformation* object_info, void*
   snapshot_regions_.push_back(std::unique_ptr<simgrid::mc::Region>(std::move(region)));
 }
 
-const void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, ReadOptions options) const
+void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, ReadOptions options) const
 {
   Region* region = this->get_region((void*)address.address());
   if (region) {
-    const void* res = region->read(buffer, (void*)address.address(), size);
+    void* res = region->read(buffer, (void*)address.address(), size);
     if (buffer == res || options & ReadOptions::lazy())
       return res;
     else {
@@ -250,7 +249,7 @@ const void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr<void>
   } else
     return this->process()->read_bytes(buffer, size, address, options);
 }
-/** @brief Find the snapshoted region from a pointer
+/** @brief Find the snapshotted region from a pointer
  *
  *  @param addr     Pointer
  * */
@@ -268,7 +267,7 @@ Region* Snapshot::get_region(const void* addr) const
   return nullptr;
 }
 
-/** @brief Find the snapshoted region from a pointer, with a hinted_region */
+/** @brief Find the snapshotted region from a pointer, with a hinted_region */
 Region* Snapshot::get_region(const void* addr, Region* hinted_region) const
 {
   if (hinted_region->contain(simgrid::mc::remote(addr)))
@@ -283,7 +282,7 @@ void Snapshot::restore(RemoteClient* process)
 
   // Restore regions
   for (std::unique_ptr<simgrid::mc::Region> const& region : snapshot_regions_) {
-    if (region) // privatized variables are not snapshoted
+    if (region) // privatized variables are not snapshotted
       region.get()->restore();
   }