From 119680bc5eb54ccb388d8145abf77b51de5c5652 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 12 May 2007 16:14:55 +0200 Subject: [PATCH] [TESTS] test_pools: added support for dlmalloc() --- tests/test_pools.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tests/test_pools.c b/tests/test_pools.c index 9ef833c19..c8558dba9 100644 --- a/tests/test_pools.c +++ b/tests/test_pools.c @@ -1,7 +1,10 @@ /* * Contribution from Aleksandar Lazic * - * Build with : gcc -O2 -o test_pools test_pools.c + * Build with : + * gcc -O2 -o test_pools test_pools.c + * or with dlmalloc too : + * gcc -O2 -o test_pools -D USE_DLMALLOC test_pools.c -DUSE_DL_PREFIX dlmalloc.c */ #include @@ -150,7 +153,7 @@ static bool test_speed1(void) count += 3 * loop; } while (timeval_elapsed(&tv) < 5.0); - fprintf(stderr, "haprox: %.0f ops/sec\n", count/timeval_elapsed(&tv)); + fprintf(stderr, "haproxy : %10.0f ops/sec\n", count/timeval_elapsed(&tv)); pool_destroy(pool_talloc); @@ -160,7 +163,8 @@ static bool test_speed1(void) void *p1, *p2, *p3; for (i=0;i