From 6281f580674813e58f083f63031c433393a30129 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 24 Feb 2021 15:28:40 +0100 Subject: Awesome indeed --- libc/inc/mem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/inc') diff --git a/libc/inc/mem.h b/libc/inc/mem.h index 0498d8c..e4416dd 100644 --- a/libc/inc/mem.h +++ b/libc/inc/mem.h @@ -9,8 +9,8 @@ int malloc_allocated; void *malloc_debug(u32 size, const char *file, int line, const char *func, const char *inp); void free_debug(void *ptr, const char *file, int line, const char *func, const char *inp); -#define malloc(size) malloc_debug(size, __FILE__, __LINE__, __func__, #size) -#define free(ptr) free_debug(ptr, __FILE__, __LINE__, __func__, #ptr) +#define malloc(size) malloc_debug((u32)(size), __FILE__, __LINE__, __func__, #size) +#define free(ptr) free_debug((void *)(ptr), __FILE__, __LINE__, __func__, #ptr) void *realloc(void *ptr, u32 size); void *zalloc(u32 size); -- cgit v1.2.3