---
name: "al_set_memory_interface"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_set_memory_interface/3alleg5"
---

# al\_set\_memory\_interface(3alleg5)

Allegro 5 API

## NAME

al\_set\_memory\_interface - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_set_memory_interface(ALLEGRO_MEMORY_INTERFACE *memory_interface)
  ```

## DESCRIPTION

Override the memory management functions with implementations of al\_malloc\_with\_context(3alleg5), al\_free\_with\_context(3alleg5), al\_realloc\_with\_context(3alleg5) and al\_calloc\_with\_context(3alleg5). The context arguments may be used for debugging. The new functions should be thread safe.

If the pointer is NULL, the default behaviour will be restored.

## SEE ALSO

ALLEGRO\_MEMORY\_INTERFACE(3alleg5)
