SDL_GetMemoryFunctions(3)

✨ SDL_GetMemoryFunctions ✨

okay bestie, welcome to the SDL3 FUNCTIONS manual, and today's main character is SDL_GetMemoryFunctions(3) 🫢 she's lowkey the plug for peeking at whichever memory functions SDL is currently using. no cap.


πŸŽ€ NAME πŸŽ€

SDL_GetMemoryFunctions β€” Get the current set of SDL memory functions.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_stdinc.h>

void SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
                            SDL_calloc_func *calloc_func,
                            SDL_realloc_func *realloc_func,
                            SDL_free_func *free_func);

πŸ’– 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 πŸ”₯

bestie, listen. This does not hold a lock, so do not call this in the unlikely event of a background thread calling SDL_SetMemoryFunctions simultaneously. it's giving race condition energy and we are not doing that today πŸ’€

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. periodt.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole vibe, bestie πŸ¦‹ this lil page came straight from Simple Directmedia Layer, SDL 3.4.18, all about SDL_GetMemoryFunctions(3). go forth and memory-function responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from