- // simix_global_p = REMOTE(simix_global);
- smx_global_t simix_global_p;
- this->read_variable("simix_global", &simix_global_p, sizeof(simix_global_p));
+ static_assert(std::is_same<
+ std::unique_ptr<simgrid::simix::Global>,
+ decltype(simix_global)
+ >::value, "Unexpected type for simix_global");
+ static_assert(sizeof(simix_global) == sizeof(simgrid::simix::Global*),
+ "Bad size for simix_global");
+
+ RemotePtr<simgrid::simix::Global> simix_global_p{this->read_variable<simgrid::simix::Global*>("simix_global")};