aboutsummaryrefslogtreecommitdiff
path: root/src/chattymalloc.c
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-01-08 17:58:44 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-01-08 17:58:44 +0100
commit0978c0cbbcdca5394b2a0aeeab0771939021fd15 (patch)
tree98ff85910f3f2b64299cc27a0915f922514b39f6 /src/chattymalloc.c
parent6ec6c92136e26949e2fcd218707b4031885b5b03 (diff)
downloadallocbench-0978c0cbbcdca5394b2a0aeeab0771939021fd15.tar.gz
allocbench-0978c0cbbcdca5394b2a0aeeab0771939021fd15.zip
add tid to chattymalloc log
Diffstat (limited to 'src/chattymalloc.c')
-rw-r--r--src/chattymalloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/chattymalloc.c b/src/chattymalloc.c
index 8614a27..36b50c9 100644
--- a/src/chattymalloc.c
+++ b/src/chattymalloc.c
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/types.h>
#include <unistd.h>
static char tmpbuff[4096];
@@ -40,6 +41,8 @@ write_output(const char* fmt, ...)
/* lockf(out, F_LOCK, 0); */
+ dprintf(out, "%d: ", gettid());
+
va_list args;
va_start(args, fmt);
vdprintf(out, fmt, args);