Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix mallocator tesh
authorPaul Bédaride <paul.bedaride@gmail.com>
Thu, 24 Jul 2014 13:16:12 +0000 (15:16 +0200)
committerPaul Bédaride <paul.bedaride@gmail.com>
Thu, 24 Jul 2014 13:16:12 +0000 (15:16 +0200)
teshsuite/xbt/mallocator/mallocator.tesh
teshsuite/xbt/mallocator/mallocator_test.c

index 87583f1..6eebf9a 100644 (file)
@@ -1,5 +1,5 @@
-$ ${bindir:=.}/mallocator_test
-> Elems: (0,8) (1,16) (2,24) (3,32) (4,40) (5,48) (6,56) (7,64) (8,72) (9,80) (10,88)
-> Elems: (0,8) (1,16) (2,24) (3,32) (4,40)
-> Elems: (0,8) (1,16) (3,32) (4,40)
-> Elems: (0,8) (1,16) (3,32) (4,40) (11,24) (12,48) (13,56) (14,64) (15,72)
+$ ${bindir:=.}/mallocator
+> Elems: (0,-2) (1,-6) (2,-8) (3,-4) (4,-14) (5,-16) (6,-18) (7,-28) (8,-30) (9,-32) (10,-34)
+> Elems: (0,-2) (1,-6) (2,-8) (3,-4) (4,-14)
+> Elems: (0,-2) (1,-6) (3,-4) (4,-14)
+> Elems: (0,-2) (1,-6) (3,-4) (4,-14) (11,-8) (12,-16) (13,-18) (14,-28) (15,-30)
index 58166bf..6eda006 100644 (file)
@@ -27,7 +27,7 @@ static void pprint_elems(xbt_dynar_t elems) {
   element_t elem;
   printf("Elems:");
   xbt_dynar_foreach(elems, iter, elem) {
   element_t elem;
   printf("Elems:");
   xbt_dynar_foreach(elems, iter, elem) {
-    printf(" (%d,%ld)", elem->value, base_mallocator-elem);
+    printf(" (%d,%d)", elem->value, (int)(base_mallocator-elem)/(int)sizeof(int));
   }
   printf("\n");
 }
   }
   printf("\n");
 }