X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b5b885cc2a87003f2774fcd64358e735b8dcd2e2..4667db33a753d88cbcd186f191fb1e65f49f4bd6:/src/mc/mc_diff.cpp diff --git a/src/mc/mc_diff.cpp b/src/mc/mc_diff.cpp index e877474420..6e2bb9fadf 100644 --- a/src/mc/mc_diff.cpp +++ b/src/mc/mc_diff.cpp @@ -11,6 +11,7 @@ #include "mc/mc.h" #include "xbt/mmalloc.h" #include "mc/datatypes.h" +#include "src/mc/malloc.hpp" #include "src/mc/mc_private.h" #include "src/mc/mc_snapshot.h" #include "src/mc/mc_dwarf.hpp" @@ -21,13 +22,9 @@ using simgrid::mc::remote; XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt, "Logging specific to mc_diff in mc"); -extern "C" { - /*********************************** Heap comparison ***********************************/ /***************************************************************************************/ -typedef char *type_name; - struct XBT_PRIVATE s_mc_diff { s_xbt_mheap_t std_heap_copy; std::size_t heaplimit; @@ -218,7 +215,8 @@ static int equal_fragments(struct s_mc_diff *state, int b1, int f1, int b2, return 0; } -} +namespace simgrid { +namespace mc { int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2, std::vector* i1, @@ -275,16 +273,14 @@ int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2, memset(state->equals_to2, 0, state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(s_heap_area_t)); memset(state->types1, 0, - state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(type_name *)); + state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(char**)); memset(state->types2, 0, - state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(type_name *)); + state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(char**)); return 0; } -extern "C" { - void reset_heap_information() { @@ -1589,3 +1585,4 @@ int mmalloc_linear_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2) #endif } +}