Function SDL_GetMemoryFunctions

pub unsafe extern "C" fn SDL_GetMemoryFunctions(
    malloc_func: *mut Option<unsafe extern "C" fn(_: usize) -> *mut c_void>,
    calloc_func: *mut Option<unsafe extern "C" fn(_: usize, _: usize) -> *mut c_void>,
    realloc_func: *mut Option<unsafe extern "C" fn(_: *mut c_void, _: usize) -> *mut c_void>,
    free_func: *mut Option<unsafe extern "C" fn(_: *mut c_void)>,
)
Available on crate feature dep_sdl3 only.
Expand description

Get the current set of SDL memory functions.

§Parameters

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

§Thread safety

This does not hold a lock, so do not call this in the unlikely event of a background thread calling SDL_SetMemoryFunctions simultaneously.

§Availability

This function is available since SDL 3.2.0.

§See also