#include "xbt/function_types.h"
#include "xbt/mmalloc.h"
#include "../simix/smx_private.h"
+#include "../xbt/mmalloc/mmprivate.h"
#include "xbt/automaton.h"
#include "xbt/hash.h"
#include "msg/msg.h"
size_t size;
}s_mc_checkpoint_ignore_region_t, *mc_checkpoint_ignore_region_t;
+inline static void* mc_snapshot_get_heap_end(mc_snapshot_t snapshot) {
+ if(snapshot==NULL)
+ xbt_die("snapshot is NULL");
+ xbt_mheap_t heap = (xbt_mheap_t)snapshot->regions[0]->data;
+ return heap->breakval;
+}
+
mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall);
mc_snapshot_t MC_take_snapshot(int num_state);
void MC_restore_snapshot(mc_snapshot_t);
/* you must wrap the code between MC_SET_RAW_MODE and MC_UNSET_RAW_MODE */
extern void *std_heap;
-extern void *raw_heap;
+extern void *mc_heap;
/* FIXME: Horrible hack! because the mmalloc library doesn't provide yet of */
/* size_t bytes_free; /\* Byte total of chunks in the free list. *\/ */
/* }; */
-#define MC_SET_RAW_MEM mmalloc_set_current_heap(raw_heap)
-#define MC_UNSET_RAW_MEM mmalloc_set_current_heap(std_heap)
+#define MC_SET_MC_HEAP mmalloc_set_current_heap(mc_heap)
+#define MC_SET_STD_HEAP mmalloc_set_current_heap(std_heap)
/******************************* MEMORY MAPPINGS ***************************/