From 8b0bcf936f5bf6179cceb12151ff40676ac409a7 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 19 Feb 2009 03:58:14 -0500 Subject: [PATCH] Fixed allocator debug output. --- utils/mojoshader-compiler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/mojoshader-compiler.c b/utils/mojoshader-compiler.c index 1c74fa8b..ea59708e 100644 --- a/utils/mojoshader-compiler.c +++ b/utils/mojoshader-compiler.c @@ -15,8 +15,10 @@ static const char **include_paths = NULL; static unsigned int include_path_count = 0; +#define MOJOSHADER_DEBUG_MALLOC 1 + #if MOJOSHADER_DEBUG_MALLOC -static void *Malloc(int len) +static void *Malloc(int len, void *d) { void *ptr = malloc(len + sizeof (int)); int *store = (int *) ptr; @@ -27,7 +29,7 @@ static void *Malloc(int len) } // Malloc -static void Free(void *_ptr) +static void Free(void *_ptr, void *d) { int *ptr = (((int *) _ptr) - 1); int len = *ptr;