Scroll to navigation

SDL_malloc_func(3type) SDL3 DATATYPES SDL_malloc_func(3type)

NAME

SDL_malloc_func - A callback used to implement SDL_malloc ().

HEADER FILE

Defined in SDL3/SDL_stdinc.h

SYNOPSIS

#include "SDL3/SDL.h"
typedef void *(SDLCALL *SDL_malloc_func)(size_t size);

DESCRIPTION

SDL will always ensure that the passed size is greater than 0.

FUNCTION PARAMETERS

the size to allocate.

RETURN VALUE

Returns a pointer to the allocated memory, or NULL if allocation failed.

THREAD SAFETY

It should be safe to call this callback from any thread.

AVAILABILITY

This datatype is available since SDL 3.1.3.

SEE ALSO

(3), SDL_malloc(3), (3), SDL_GetOriginalMemoryFunctions(3), (3), SDL_GetMemoryFunctions(3), (3), SDL_SetMemoryFunctions(3)

SDL 3.1.6 Simple Directmedia Layer