目次 - SDL 3.0 API(機能別) - 標準ライブラリ - SDL_GetOriginalMemoryFunctions

SDL_GetOriginalMemoryFunctions

元のSDLメモリ関数を得る

ヘッダ

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);

引数

SDL_malloc_func *malloc_funcmalloc関数の書込先へのポインタ
SDL_calloc_func *calloc_funccalloc関数の書込先へのポインタ
SDL_realloc_func *realloc_funcrealloc関数の書込先へのポインタ
SDL_free_func *free_funcfree関数の書込先へのポインタ

詳細

これらがSDL_SetMemoryFunctionsで設定しなかった場合にデフォルトで使用するSDL_mallocとその仲間の関数である. 背後でCランタイムのmalloc関数を使用しているとは限らない. 異なる環境やビルド設定では予期しない動作を引き起こす可能性がある.

スレッドセーフ

この関数はどのスレッドからも安全に呼べる.

バージョン

SDL 3.2.0以降

SDL Wikiへのリンク

SDL_GetOriginalMemoryFunctions - SDL Wiki