Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use a RemotePtr<> for RemoteProcess::heap_address.
[simgrid.git] / src / mc / remote / RemoteProcess.hpp
index 78bb6b723358235dacb44f17de3542a38b2d0165..eda86d983f4dc9df0bc214e8ff1efbe7365b50cb 100644 (file)
@@ -27,7 +27,7 @@ public:
 
   /** Hostname (owned by `mc_model_checker->hostnames_`) */
   const xbt::string* hostname = nullptr;
-  std::string name;
+  xbt::string name;
 
   void clear()
   {
@@ -75,7 +75,7 @@ private:
 public:
   explicit RemoteProcess(pid_t pid);
   ~RemoteProcess() override;
-  void init();
+  void init(xbt_mheap_t mmalloc_default_mdp, void* maxpid, void* actors, void* dead_actors);
 
   RemoteProcess(RemoteProcess const&) = delete;
   RemoteProcess(RemoteProcess&&)      = delete;
@@ -164,7 +164,13 @@ public:
   /* ***************** */
   /* SIMIX-related API */
   /* ***************** */
+private:
+  // Cache the address of the variables we read directly in the memory of remote
+  void* maxpid_addr_;
+  void* actors_addr_;
+  void* dead_actors_addr_;
 
+public:
   std::vector<ActorInformation>& actors();
   std::vector<ActorInformation>& dead_actors();
 
@@ -195,6 +201,7 @@ public:
   }
 
   unsigned long get_maxpid() const;
+  void get_actor_vectors(RemotePtr<s_xbt_dynar_t>& actors, RemotePtr<s_xbt_dynar_t>& dead_actors);
 
   void dump_stack() const;
 
@@ -239,7 +246,7 @@ private:
 
 public:
   /** Address of the heap structure in the MCed process. */
-  void* heap_address;
+  RemotePtr<s_xbt_mheap_t> heap_address;
 
   /** Copy of the heap structure of the process
    *