SDL Digest, Vol 76, Issue 89

<1367010768.33226.YahooMailNeo at>
Content-Type: text/plain; charset=“iso-8859-1”

Actually, if it’s all about the memory managers, whatever program you’re
using SDL in is going to have its own malloc anyway.? (Assuming you’re
writing from a native code language, at least.)? Why not have a
SDL_RegisterMemoryManager() function, where you pass in a set of function
pointers, for malloc, realloc, and free?

That is a good idea. Perhaps something like this:

/* Arbitrary .c file /
static void malloc_data, realloc_data, free_data;
static void
(malloc_function)( void /
Data /, size_t );
static void
(realloc_function)( void /
Data /, void, size_t );
static void (free_function)( void /
Data /, void );

void* SDL_malloc( size_t size )

}> Date: Fri, 26 Apr 2013 14:12:48 -0700 (PDT)

From: Mason Wheeler
To: “sdl at
Subject: Re: [SDL] Link SDL2 statically with Visual C++ 2012