---
name: "SDL_realloc_func"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_realloc_func"
---

# SDL\_realloc\_func(3type)

A callback used to implement SDL\_realloc ().

## NAME

SDL\_realloc\_func - A callback used to implement  **SDL\_realloc** ().

## HEADER FILE

Defined in SDL3/SDL\_stdinc.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef void \*(SDLCALL \*SDL\_realloc\_func)(void \*mem, size\_t size);**

## DESCRIPTION

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

## FUNCTION PARAMETERS

- *mem*

  a pointer to allocated memory to reallocate, or NULL.

- *size*

  the new size of the memory.

## RETURN VALUE

Returns a pointer to the newly 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.2.0.

## SEE ALSO

**•**(3), [**SDL\_realloc**(3)](/SDL_realloc/3.md), **•**(3), [**SDL\_GetOriginalMemoryFunctions**(3)](/SDL_GetOriginalMemoryFunctions/3.md), **•**(3), [**SDL\_GetMemoryFunctions**(3)](/SDL_GetMemoryFunctions/3.md), **•**(3), [**SDL\_SetMemoryFunctions**(3)](/SDL_SetMemoryFunctions/3.md)
