diff options
| -rw-r--r-- | src/benchmarks/t_test1/t-test1.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <stdio.h> +#include <unistd.h> #ifdef __GCC__ -#include <unistd.h> #include <sys/time.h> #include <sys/resource.h> #include <sys/wait.h> @@ -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; |
