struct s_mc_snapshot;
struct s_dw_type;
-int mmalloc_compare_heap(struct s_mc_snapshot* snapshot1, struct s_mc_snapshot* snapshot2, xbt_mheap_t heap1, xbt_mheap_t heap2);
+int mmalloc_compare_heap(struct s_mc_snapshot* snapshot1, struct s_mc_snapshot* snapshot2);
int mmalloc_linear_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2);
int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t to_ignore1, xbt_dynar_t to_ignore2);
int compare_heap_area(void *area1, void* area2, struct s_mc_snapshot* snapshot1, struct s_mc_snapshot* snapshot2, xbt_dynar_t previous, struct s_dw_type *type, int pointer_level);
return result;
};
-static xbt_dynar_t MC_take_snapshot_stacks(mc_snapshot_t * snapshot, void *heap)
+static xbt_dynar_t MC_take_snapshot_stacks(mc_snapshot_t * snapshot)
{
xbt_dynar_t res =
if (_sg_mc_visited > 0 || strcmp(_sg_mc_property_file, "")) {
snapshot->stacks =
- MC_take_snapshot_stacks(&snapshot, snapshot->regions[0]->data);
+ MC_take_snapshot_stacks(&snapshot);
if (_sg_mc_hash && snapshot->stacks != NULL) {
snapshot->hash = mc_hash_processes_state(num_state, snapshot->stacks);
} else {
#endif
/* Compare heap */
- if (mmalloc_compare_heap(s1, s2, (xbt_mheap_t) s1->regions[0]->data,
- (xbt_mheap_t) s2->regions[0]->data) > 0) {
+ if (mmalloc_compare_heap(s1, s2) > 0) {
#ifdef MC_DEBUG
xbt_os_walltimer_stop(timer);
}
-int mmalloc_compare_heap(mc_snapshot_t snapshot1, mc_snapshot_t snapshot2,
- xbt_mheap_t heap1, xbt_mheap_t heap2)
+int mmalloc_compare_heap(mc_snapshot_t snapshot1, mc_snapshot_t snapshot2)
{
struct s_mc_diff *state = mc_diff_info;
- if (heap1 == NULL && heap2 == NULL) {
- XBT_DEBUG("Malloc descriptors null");
- return 0;
- }
-
/* Start comparison */
size_t i1, i2, j1, j2, k;
void *addr_block1, *addr_block2, *addr_frag1, *addr_frag2;