SDL_GETORIGINALMEMORYFUNCTIONS(3)
π SDL_GetOriginalMemoryFunctions(3) π
okay bestie, welcome to the SDL3 functions corner of the manual, this one's called SDL_GetOriginalMemoryFunctions and it's giving "where did all the memory go" in the best way possible π§β¨
β¨ NAME β¨
SDL_GetOriginalMemoryFunctions β grab the original set of SDL memory functions π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_stdinc.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 π¦
so here's the tea, bestie β this is what SDL_malloc and friends will use by default, as long as nobody has called SDL_SetMemoryFunctions. no cap.
and now for the plot twist π 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. literally anything. so do not assume, okay? π
π FUNCTION PARAMETERS π
malloc_funcβ gets filled with the malloc function β¨calloc_funcβ gets filled with the calloc function β¨realloc_funcβ gets filled with the realloc function β¨free_funcβ gets filled with the free function β¨
π₯ THREAD SAFETY π₯
good news queen π it is safe to call this function from any thread. go off, thread it, no notes π
β AVAILABILITY β
this function is available since SDL 3.2.0 π
and that's the whole page, you ate it, periodt π β¨
from the Simple Directmedia Layer era, SDL 3.4.18 edition β SDL_GetOriginalMemoryFunctions(3), mwah π«Άπ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms