- if(type_id){
- type = xbt_dict_get_or_null(all_types, type_id);
- if(strcmp(type->name, "char") ==0){
- if(area1 == area2)
- return -1;
- }
- if(type->size == 0 || type->type == e_dw_pointer_type){
- if(!type->dw_type_id){
- type_desc = get_type_description(all_types, type->name);
- if(type_desc)
- type = xbt_dict_get_or_null(all_types, type_desc);
- else
- type = xbt_dict_get_or_null(other_types, get_type_description(other_types, type->name));
- }else{
- type = xbt_dict_get_or_null(all_types, type->dw_type_id);
- }
- }
- if(type->size > 0){
- if(heapinfo1[block1].busy_frag.frag_size[frag1] != type->size || heapinfo2[block2].busy_frag.frag_size[frag2] != type->size)
- return -1;
- }
+ if(type_size != -1){
+ if(heapinfo1[block1].busy_frag.frag_size[frag1] == -1 || heapinfo2[block2].busy_frag.frag_size[frag2] == -1)
+ return -1;
+ if(type_size != heapinfo1[block1].busy_frag.frag_size[frag1] || type_size != heapinfo2[block2].busy_frag.frag_size[frag2])
+ return -1;