From ea709451e82ff5d963d8b6c6b6099a1789d01893 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Fri, 15 Dec 2023 23:42:59 +0100 Subject: [PATCH] log allocator: use %m to format size --- core/log/log_allocator.odin | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/log/log_allocator.odin b/core/log/log_allocator.odin index 934f0d643..0608f6f92 100644 --- a/core/log/log_allocator.odin +++ b/core/log/log_allocator.odin @@ -39,14 +39,14 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, case .Alloc: logf( la.level, - "%s%s>>> ALLOCATOR(mode=.Alloc, size=%d, alignment=%d)", + "%s%s>>> ALLOCATOR(mode=.Alloc, size=%m, alignment=%d)", la.prefix, padding, size, alignment, location = location, ) case .Alloc_Non_Zeroed: logf( la.level, - "%s%s>>> ALLOCATOR(mode=.Alloc_Non_Zeroed, size=%d, alignment=%d)", + "%s%s>>> ALLOCATOR(mode=.Alloc_Non_Zeroed, size=%m, alignment=%d)", la.prefix, padding, size, alignment, location = location, ) @@ -54,7 +54,7 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, if old_size != 0 { logf( la.level, - "%s%s<<< ALLOCATOR(mode=.Free, ptr=%p, size=%d)", + "%s%s<<< ALLOCATOR(mode=.Free, ptr=%p, size=%m)", la.prefix, padding, old_memory, old_size, location = location, ) @@ -76,7 +76,7 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, case .Resize: logf( la.level, - "%s%s>>> ALLOCATOR(mode=.Resize, ptr=%p, old_size=%d, size=%d, alignment=%d)", + "%s%s>>> ALLOCATOR(mode=.Resize, ptr=%p, old_size=%m, size=%m, alignment=%d)", la.prefix, padding, old_memory, old_size, size, alignment, location = location, ) @@ -111,4 +111,4 @@ log_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode, } } return data, err -} \ No newline at end of file +}