# SDL Digest, Vol 76, Issue 89

**URL:** <https://discourse.libsdl.org/t/sdl-digest-vol-76-issue-89/19560>\
**Category:** SDL Development\
**Created:** [April 27, 2013, 5:19pm UTC](https://discourse.libsdl.org/t/sdl-digest-vol-76-issue-89/19560 "2013-04-27T17:19:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jared\_Maddox](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@Jared\_Maddox](https://discourse.libsdl.org/u/Jared_Maddox)\
**Post date:** [April 27, 2013, 5:19pm UTC](https://discourse.libsdl.org/t/sdl-digest-vol-76-issue-89/19560/1 "2013-04-27T17:19:05Z")

</div>

> Message-ID:  
> \<1367010768.33226.YahooMailNeo at [web122502.mail.ne1.yahoo.com](http://web122502.mail.ne1.yahoo.com)\>  
> 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 [lists.libsdl.org](http://lists.libsdl.org)”   
> Subject: Re: [SDL] Link SDL2 statically with Visual C++ 2012
