---
name: "al_set_memory_interface"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_set_memory_interface"
---

# al\_set\_memory\_interface(3)

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(3)](/al_malloc_with_context/3.md), [al\_free\_with\_context(3)](/al_free_with_context/3.md), [al\_realloc\_with\_context(3)](/al_realloc_with_context/3.md) and [al\_calloc\_with\_context(3)](/al_calloc_with_context/3.md). 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(3)](/ALLEGRO_MEMORY_INTERFACE/3.md)
