From b8b694864e90a2174234b199d39e7e77f8ef987e Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 20 Feb 2023 02:42:11 +0000 Subject: [PATCH] Whoops, overallocated. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4194 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem.c b/src/mem.c index 787c0f04..d4a15797 100644 --- a/src/mem.c +++ b/src/mem.c @@ -340,7 +340,7 @@ static void* _tf_uv_calloc(size_t nmemb, size_t size) count = tf_util_backtrace(buffer, sizeof(buffer) / sizeof(*buffer)); overhead += sizeof(tf_mem_node_t) + sizeof(void*) * count; } - void* ptr = calloc(1, nmemb * rounded_up_size + overhead); + void* ptr = calloc(1, rounded_up_size + overhead); if (ptr) { __atomic_add_fetch(&s_uv_malloc_size, total_size, __ATOMIC_RELAXED);