Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] C++ style SimixProcessInformation
[simgrid.git] / src / mc / Process.hpp
index 8de8435..7c4c983 100644 (file)
@@ -49,19 +49,22 @@ typedef int mc_process_cache_flags_t;
 #define MC_PROCESS_CACHE_FLAG_MALLOC_INFO 2
 #define MC_PROCESS_CACHE_FLAG_SIMIX_PROCESSES 4
 
-struct s_mc_smx_process_info {
+namespace simgrid {
+namespace mc {
+
+class SimixProcessInformation {
+public:
   /** MCed address of the process */
-  void* address;
-  /** (Flat) Copy of the process data structure */
-  struct s_smx_process copy;
+  void* address = nullptr;
+  union {
+    /** (Flat) Copy of the process data structure */
+    struct s_smx_process copy;
+  };
   /** Hostname (owned by `mc_modelchecker->hostnames`) */
-  const char* hostname;
-  char* name;
+  const char* hostname = nullptr;
+  char* name = nullptr;
 };
 
-namespace simgrid {
-namespace mc {
-
 struct IgnoredRegion {
   std::uint64_t addr;
   std::size_t size;