From 8890859baa246470c82ebdbd46c4e15ac226175b Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 10 Aug 2019 16:00:50 +0200 Subject: print malloc_stats to stdout --- src/benchmarks/t_test1/t-test1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/benchmarks/t_test1/t-test1.c b/src/benchmarks/t_test1/t-test1.c index 86eb034..7418693 100644 --- a/src/benchmarks/t_test1/t-test1.c +++ b/src/benchmarks/t_test1/t-test1.c @@ -38,9 +38,9 @@ #endif #include +#include #ifdef __GCC__ -#include #include #include #include @@ -394,6 +394,9 @@ int main(int argc, char *argv[]) if (st[i].sp) free(st[i].sp); } free(st); + // Print malloc_stats to stdout + close(STDERR_FILENO); + dup2(STDOUT_FILENO, STDERR_FILENO); malloc_stats(); printf("Done.\n"); return 0; -- cgit v1.2.3