#include "simgrid/modelchecker.h" /* our public interface (and definition of HAVE_MC) */
#include "xbt/automaton.h"
+#define STD_HEAP_SIZE 20480000 /* Maximum size of the system's heap */
SG_BEGIN_DECL()
extern void *std_heap;
extern void *raw_heap;
-#define STD_HEAP_SIZE 20480000 /* Maximum size of the system's heap */
+
/* FIXME: Horrible hack! because the mmalloc library doesn't provide yet of */
/* an API to query about the status of a heap, we simply call mmstats and */
#include "xbt/ex_interface.h" /* internals of backtrace setup */
#include "xbt/str.h"
+#include "mc/mc.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mm_diff, xbt,
"Logging specific to mm_diff in mmalloc");
//void* heapbase1 = (char *)mdp1 + ((char *)mdp1->heapbase - (char *)s_heap);
//void* heapbase2 = (char *)mdp2 + ((char *)mdp2->heapbase - (char *)s_heap);
- xbt_mheap_t s_heap = mmalloc_get_current_heap();
+ void* s_heap = (char *)mmalloc_get_current_heap() - STD_HEAP_SIZE - getpagesize();
void *heapbase1 = (char *)mdp1 + BLOCKSIZE;
void *heapbase2 = (char *)mdp2 + BLOCKSIZE;