sdlGetOriginalMemoryFunctions function

void sdlGetOriginalMemoryFunctions(
  1. Pointer<Pointer<NativeFunction<SdlMallocFunc>>> mallocFunc,
  2. Pointer<Pointer<NativeFunction<SdlCallocFunc>>> callocFunc,
  3. Pointer<Pointer<NativeFunction<SdlReallocFunc>>> reallocFunc,
  4. Pointer<Pointer<NativeFunction<SdlFreeFunc>>> freeFunc,
)

Get the original set of SDL memory functions

\since This function is available since SDL 2.24.0.

extern DECLSPEC void SDLCALL SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)

Implementation

void sdlGetOriginalMemoryFunctions(
    Pointer<Pointer<NativeFunction<SdlMallocFunc>>> mallocFunc,
    Pointer<Pointer<NativeFunction<SdlCallocFunc>>> callocFunc,
    Pointer<Pointer<NativeFunction<SdlReallocFunc>>> reallocFunc,
    Pointer<Pointer<NativeFunction<SdlFreeFunc>>> freeFunc) {
  final sdlGetOriginalMemoryFunctionsLookupFunction = libSdl2.lookupFunction<
          Void Function(
              Pointer<Pointer<NativeFunction<SdlMallocFunc>>> mallocFunc,
              Pointer<Pointer<NativeFunction<SdlCallocFunc>>> callocFunc,
              Pointer<Pointer<NativeFunction<SdlReallocFunc>>> reallocFunc,
              Pointer<Pointer<NativeFunction<SdlFreeFunc>>> freeFunc),
          void Function(
              Pointer<Pointer<NativeFunction<SdlMallocFunc>>> mallocFunc,
              Pointer<Pointer<NativeFunction<SdlCallocFunc>>> callocFunc,
              Pointer<Pointer<NativeFunction<SdlReallocFunc>>> reallocFunc,
              Pointer<Pointer<NativeFunction<SdlFreeFunc>>> freeFunc)>(
      'SDL_GetOriginalMemoryFunctions');
  return sdlGetOriginalMemoryFunctionsLookupFunction(
      mallocFunc, callocFunc, reallocFunc, freeFunc);
}