Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
exclude lib for mc on freebsd
[simgrid.git] / src / mc / remote / RemoteSimulation.cpp
index e56c9bd..b9abdbe 100644 (file)
@@ -16,6 +16,8 @@
 #include <libunwind-ptrace.h>
 #include <sys/mman.h> // PROT_*
 
+#include <memory>
+
 using simgrid::mc::remote;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc, "MC process information");
@@ -84,6 +86,7 @@ static const std::vector<std::string> filtered_libraries = {
     "liblua5.3",
     "liblzma",
     "libm",
+    "libmd",
     "libnghttp2",
     "libomp",
     "libpapi",
@@ -146,7 +149,7 @@ static std::string get_lib_name(const std::string& pathname)
 
 static ssize_t pread_whole(int fd, void* buf, size_t count, off_t offset)
 {
-  char* buffer       = (char*)buf;
+  auto* buffer       = static_cast<char*>(buf);
   ssize_t real_count = count;
   while (count) {
     ssize_t res = pread(fd, buffer, count, offset);
@@ -166,7 +169,7 @@ static ssize_t pread_whole(int fd, void* buf, size_t count, off_t offset)
 
 static ssize_t pwrite_whole(int fd, const void* buf, size_t count, off_t offset)
 {
-  const char* buffer = (const char*)buf;
+  const auto* buffer = static_cast<const char*>(buf);
   ssize_t real_count = count;
   while (count) {
     ssize_t res = pwrite(fd, buffer, count, offset);
@@ -259,7 +262,7 @@ void RemoteSimulation::refresh_heap()
 {
   // Read/dereference/refresh the std_heap pointer:
   if (not this->heap)
-    this->heap.reset(new s_xbt_mheap_t());
+    this->heap = std::make_unique<s_xbt_mheap_t>();
   this->read_bytes(this->heap.get(), sizeof(mdesc), remote(this->heap_address));
   this->cache_flags_ |= RemoteSimulation::cache_heap;
 }