A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mc] Move MC malloc introspection code in simgrid::mc
[simgrid.git]
/
src
/
mc
/
mc_diff.cpp
diff --git
a/src/mc/mc_diff.cpp
b/src/mc/mc_diff.cpp
index
e877474
..
6e2bb9f
100644
(file)
--- 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 "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"
#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");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt,
"Logging specific to mc_diff in mc");
-extern "C" {
-
/*********************************** Heap comparison ***********************************/
/***************************************************************************************/
/*********************************** Heap comparison ***********************************/
/***************************************************************************************/
-typedef char *type_name;
-
struct XBT_PRIVATE s_mc_diff {
s_xbt_mheap_t std_heap_copy;
std::size_t heaplimit;
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;
}
return 0;
}
-}
+namespace simgrid {
+namespace mc {
int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2,
std::vector<simgrid::mc::IgnoredHeapRegion>* i1,
int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2,
std::vector<simgrid::mc::IgnoredHeapRegion>* 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,
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,
memset(state->types2, 0,
- state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(
type_name
*));
+ state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(
char*
*));
return 0;
}
return 0;
}
-extern "C" {
-
void reset_heap_information()
{
void reset_heap_information()
{
@@
-1589,3
+1585,4
@@
int mmalloc_linear_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2)
#endif
}
#endif
}
+}