X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6595b7c891982bcbe6c33df00b6698fb77799b0f..31fdb2a73f84ad56d97facc52298766e4b6aed33:/src/mc/Process.cpp diff --git a/src/mc/Process.cpp b/src/mc/Process.cpp index 3af20cb63d..125c7227b8 100644 --- a/src/mc/Process.cpp +++ b/src/mc/Process.cpp @@ -34,10 +34,10 @@ #include "mc_smx.h" #include "mc_server.h" -#include "mc/Process.hpp" -#include "mc/AddressSpace.hpp" -#include "mc/ObjectInformation.hpp" -#include "mc/Variable.hpp" +#include "src/mc/Process.hpp" +#include "src/mc/AddressSpace.hpp" +#include "src/mc/ObjectInformation.hpp" +#include "src/mc/Variable.hpp" using simgrid::mc::remote; @@ -67,6 +67,7 @@ static const char *const FILTERED_LIBS[] = { "libelf", "libgcc_s", "liblua5.1", + "liblua5.3", "liblzma", "libm", "libpthread", @@ -215,7 +216,6 @@ Process::Process(pid_t pid, int sockfd) : AddressSpace(this) process->status_ = 0; process->memory_map_ = get_memory_map(pid); process->cache_flags = MC_PROCESS_CACHE_FLAG_NONE; - process->heap = NULL; process->heap_info = NULL; process->init_memory_map_info(); process->clear_refs_fd_ = -1; @@ -274,9 +274,6 @@ Process::~Process() process->cache_flags = MC_PROCESS_CACHE_FLAG_NONE; - free(process->heap); - process->heap = NULL; - free(process->heap_info); process->heap_info = NULL; @@ -295,11 +292,10 @@ void Process::refresh_heap() { xbt_assert(mc_mode == MC_MODE_SERVER); // Read/dereference/refresh the std_heap pointer: - if (!this->heap) { - this->heap = (struct mdesc*) malloc(sizeof(struct mdesc)); - } - this->read_bytes(this->heap, sizeof(struct mdesc), remote(this->heap_address), - simgrid::mc::ProcessIndexDisabled); + if (!this->heap) + this->heap = std::unique_ptr(new s_xbt_mheap_t()); + this->read_bytes(this->heap.get(), sizeof(struct mdesc), + remote(this->heap_address), simgrid::mc::ProcessIndexDisabled); this->cache_flags |= MC_PROCESS_CACHE_FLAG_HEAP; }