SDL_calloc_func(3type)

SDL_calloc_func(3type) SDL3 DATATYPES SDL_calloc_func(3type)

NAME

SDL_calloc_func - A callback used to implement SDL_calloc().

SYNOPSIS

#include <SDL3/SDL_stdinc.h>
typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);

DESCRIPTION

SDL will always ensure that the passed nmemb and size are both greater than 0.

FUNCTION PARAMETERS

nmemb
the number of elements in the array.
size
the size of each element of the array.

RETURN VALUE

Returns a pointer to the allocated array, 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.2.0.

SEE ALSO

SDL_calloc(3), SDL_GetOriginalMemoryFunctions(3), SDL_GetMemoryFunctions(3), SDL_SetMemoryFunctions(3)

SDL 3.4.12 Simple Directmedia Layer