Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed allocator debug output.
  • Loading branch information
icculus committed Feb 19, 2009
1 parent b8652fc commit 8b0bcf9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/mojoshader-compiler.c
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 8b0bcf9

Please sign in to comment.