Skip to main content

SDL_GetOriginalMemoryFunctions

Function SDL_GetOriginalMemoryFunctions 

Source
pub unsafe extern "C" fn SDL_GetOriginalMemoryFunctions(
    malloc_func: *mut SDL_malloc_func,
    calloc_func: *mut SDL_calloc_func,
    realloc_func: *mut SDL_realloc_func,
    free_func: *mut SDL_free_func,
)
Expand description

Get the original set of SDL memory functions.

This is what SDL_malloc and friends will use by default, if there has been no call to SDL_SetMemoryFunctions. This is not necessarily using the C runtime’s malloc functions behind the scenes! Different platforms and build configurations might do any number of unexpected things.

Parameter: malloc_func filled with malloc function. Parameter: calloc_func filled with calloc function. Parameter: realloc_func filled with realloc function. Parameter: free_func filled with free function.

Thread Safety: It is safe to call this function from any thread.

Available Since: This function is available since SDL 3.2.0.