- if(state->equals_to1_(current_pair->block1,current_pair->fragment1) != NULL){
- previous_area = state->equals_to1_(current_pair->block1,current_pair->fragment1);
- heap_area_free(state->equals_to2_(previous_area->block,previous_area->fragment));
- state->equals_to2_(previous_area->block,previous_area->fragment) = NULL;
- heap_area_free(previous_area);
- }
- if(state->equals_to2_(current_pair->block2,current_pair->fragment2) != NULL){
- previous_area = state->equals_to2_(current_pair->block2,current_pair->fragment2);
- heap_area_free(state->equals_to1_(previous_area->block,previous_area->fragment));
- state->equals_to1_(previous_area->block,previous_area->fragment) = NULL;
- heap_area_free(previous_area);
- }
-
- state->equals_to1_(current_pair->block1,current_pair->fragment1) = new_heap_area(current_pair->block2, current_pair->fragment2);
- state->equals_to2_(current_pair->block2,current_pair->fragment2) = new_heap_area(current_pair->block1, current_pair->fragment1);
+ state->equals_to1_(current_pair->block1,current_pair->fragment1) = make_heap_area(current_pair->block2, current_pair->fragment2);
+ state->equals_to2_(current_pair->block2,current_pair->fragment2) = make_heap_area(current_pair->block1, current_pair->fragment1);