]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/remote/RemoteProcess.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill redundent sanity checks
[simgrid.git] / src / mc / remote / RemoteProcess.cpp
index ac1e9b2bb3170c5f94feb93999fd3985bde2f4b2..75a610d44d9de2ee7cefe7bd35f51f927d542ebd 100644 (file)
@@ -145,8 +145,6 @@ RemoteProcess::~RemoteProcess()
 void RemoteProcess::refresh_heap()
 {
   // Read/dereference/refresh the std_heap pointer:
-  if (not this->heap)
-    this->heap = std::make_unique<s_xbt_mheap_t>();
   this->read(this->heap.get(), this->heap_address);
   this->cache_flags_ |= RemoteProcess::cache_heap;
 }
@@ -167,6 +165,10 @@ void RemoteProcess::refresh_malloc_info()
   this->read_bytes(this->heap_info.data(), count * sizeof(malloc_info), remote(this->heap->heapinfo));
   this->cache_flags_ |= RemoteProcess::cache_malloc;
 }
+std::size_t RemoteProcess::get_remote_heap_bytes()
+{
+  return mmalloc_get_bytes_used_remote(get_heap()->heaplimit, get_malloc_info());
+}
 
 /** @brief Finds the range of the different memory segments and binary paths */
 void RemoteProcess::init_memory_map_info()