- for(i=block_busy1 ; i<mdp1->heapinfo[block_free1].free.next ; i++){
- if(mdp1->heapinfo[i].busy.type != mdp2->heapinfo[i].busy.type){
- XBT_DEBUG("Different type of busy block");
- return 1;
- }else{
- switch(mdp1->heapinfo[i].busy.type){
- case 0 :
- if(mdp1->heapinfo[i].busy.info.size != mdp2->heapinfo[i].busy.info.size){
- XBT_DEBUG("Different size of a large cluster");
- return 1;
- }
- break;
- default :
- if(mdp1->heapinfo[i].busy.info.frag.nfree != mdp2->heapinfo[i].busy.info.frag.nfree){
- XBT_DEBUG("Different free fragments in a fragmented block");
- return 1;
- }else{
- if(mdp1->heapinfo[i].busy.info.frag.first != mdp2->heapinfo[i].busy.info.frag.first){
- XBT_DEBUG("Different first free fragments of the block");
- return 1;
+ i = block_busy1;
+
+ while(i<mdp1->heapinfo[block_free1].free.next){
+
+ XBT_DEBUG("i (block busy) : %d", i);
+
+ if(mdp1->heapinfo[i].busy.type != mdp2->heapinfo[i].busy.type){
+ XBT_DEBUG("Different type of busy block");
+ return 1;
+ }else{
+ mdp = mdp1;
+ addr_block1 = ADDRESS(i);
+ mdp = mdp2;
+ addr_block2 = ADDRESS(i);
+ switch(mdp1->heapinfo[i].busy.type){
+ case 0 :
+ if(mdp1->heapinfo[i].busy.info.size != mdp2->heapinfo[i].busy.info.size){
+ XBT_DEBUG("Different size of a large cluster");
+ return 1;
+ }else{
+ XBT_DEBUG("Blocks %d : %p - %p / Data size : %d", i, addr_block1, addr_block2, (mdp->heapinfo[i].busy.info.size * BLOCKSIZE));
+ //XBT_DEBUG("Size of large cluster %d", mdp->heapinfo[i].busy.info.size);
+ if(memcmp(addr_block1, addr_block2, (mdp1->heapinfo[i].busy.info.size * BLOCKSIZE)) != 0){
+ XBT_DEBUG("Different data in block %d", i);
+ return 1;
+ }
+ }
+ i = i+mdp1->heapinfo[i].busy.info.size;
+ break;
+ default :
+ if(mdp1->heapinfo[i].busy.info.frag.nfree != mdp2->heapinfo[i].busy.info.frag.nfree){
+ XBT_DEBUG("Different free fragments in a fragmented block");
+ return 1;
+ }else{
+ if(mdp1->heapinfo[i].busy.info.frag.first != mdp2->heapinfo[i].busy.info.frag.first){
+ XBT_DEBUG("Different first free fragments of the block");
+ return 1;
+ }else{
+ if(memcmp(addr_block1, addr_block2, BLOCKSIZE) != 0){
+ XBT_DEBUG("Different data in fragmented block %d", i);
+ return 1;
+ }
+ }