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

# SDL\_GetOriginalMemoryFunctions(3)

Get the original set of SDL memory functions.

## NAME

SDL\_GetOriginalMemoryFunctions - Get the original set of SDL memory functions.

## HEADER FILE

Defined in SDL3/SDL\_stdinc.h

## SYNOPSIS

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

**void SDL\_GetOriginalMemoryFunctions(SDL\_malloc\_func \*malloc\_func,**                                 **SDL\_calloc\_func \*calloc\_func,**                                 **SDL\_realloc\_func \*realloc\_func,**                                 **SDL\_free\_func \*free\_func);**

## DESCRIPTION

This is what  **SDL\_malloc**\
  and friends will use by default, if there has been no call to  **SDL\_SetMemoryFunctions** . This is not necessarily using the C runtime's **malloc** functions behind the scenes! Different platforms and build configurations might do any number of unexpected things.

## FUNCTION 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

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
