ALLEGRO_MEMORY_INTERFACE(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ALLEGRO_MEMORY_INTERFACE πŸ’–

ok so bestie, welcome to the 3alleg5 manual, Allegro 5 API edition ✨ buckle up because this one is short but it's lowkey important.


🌸 NAME 🌸

ALLEGRO_MEMORY_INTERFACE β€” it's giving "the Allegro 5 API" πŸŽ€


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

typedef struct ALLEGRO_MEMORY_INTERFACE ALLEGRO_MEMORY_INTERFACE;

πŸ¦‹ DESCRIPTION πŸ¦‹

ok so this struct is literally just a lil bundle of function pointers, and it has these fields, no cap:

void *(*mi_malloc)(size_t n, int line, const char *file, const char *func);
void (*mi_free)(void *ptr, int line, const char *file, const char *func);
void *(*mi_realloc)(void *ptr, size_t n, int line, const char *file,
                    const char *func);
void *(*mi_calloc)(size_t count, size_t n, int line, const char *file,
                   const char *func);

that's the whole vibe: four hooks, each one takes a line, a file and a func so you know exactly where the memory drama went down πŸ’… main character energy fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page bestie, we ate and left no crumbs πŸ“βœ¨

this was pulled straight from the Allegro reference manual, ALLEGRO_MEMORY_INTERFACE(3alleg5) β€” go forth and manage your memory responsibly πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from