From 3295ad8b7b7dc2f2a5d7b695860e60ff09e69ea2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20B=C3=A9daride?= Date: Thu, 24 Jul 2014 15:16:12 +0200 Subject: [PATCH] Fix mallocator tesh --- teshsuite/xbt/mallocator/mallocator.tesh | 10 +++++----- teshsuite/xbt/mallocator/mallocator_test.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/teshsuite/xbt/mallocator/mallocator.tesh b/teshsuite/xbt/mallocator/mallocator.tesh index 87583f1e17..6eebf9a7e7 100644 --- a/teshsuite/xbt/mallocator/mallocator.tesh +++ b/teshsuite/xbt/mallocator/mallocator.tesh @@ -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) diff --git a/teshsuite/xbt/mallocator/mallocator_test.c b/teshsuite/xbt/mallocator/mallocator_test.c index 58166bffc5..6eda006947 100644 --- a/teshsuite/xbt/mallocator/mallocator_test.c +++ b/teshsuite/xbt/mallocator/mallocator_test.c @@ -27,7 +27,7 @@ static void pprint_elems(xbt_dynar_t elems) { 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"); } -- 2.20.1