From 8856becf34868c2ebaefff9baa294c21462f281b Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 16 Jun 2020 14:11:58 +0200 Subject: Convert most of main.c to use debugging --- utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils.c') diff --git a/utils.c b/utils.c index 20c4802..5830dfc 100644 --- a/utils.c +++ b/utils.c @@ -36,7 +36,7 @@ add_allocation(const char *allocfn, const char *callerfn, int line, void *ptr, s { struct allocation *a = malloc(sizeof(*a)); - debug(DBG_MALLOC, "%s:%i %s(%zu) = %p\n", + debug(DBG_MALLOC, "called from %s:%i - %s(%zu) = %p\n", callerfn, line, allocfn, size, ptr); a->allocfn = allocfn; @@ -99,7 +99,7 @@ __xfree(const char *fn, int line, void *ptr) free(ptr); malloc_count--; - debug(DBG_MALLOC, "%s:%i %p\n", fn, line, ptr); + debug(DBG_MALLOC, "called from %s:%i - %p\n", fn, line, ptr); list_for_each_entry_safe(a, tmp, &malloc_list, list) { if (a->ptr == ptr) { -- cgit v1.2.3