SDL_GetSystemPageSize(3)
β¨ SDL_GetSystemPageSize β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_GetSystemPageSize β she reports the size of a page of memory. that's it. that's the job. π
πΈ NAME πΈ
SDL_GetSystemPageSize β report the size of a page of memory.
π SYNOPSIS π
#include <SDL3/SDL_cpuinfo.h>
int SDL_GetSystemPageSize(void);
π¦ DESCRIPTION π¦
so here's the tea: different platforms might have different memory page sizes. like, in current times, 4 kilobytes is not unusual, but newer systems are moving to larger page sizes, and esoteric platforms might have any unexpected size. no cap, it's a whole spectrum out here. π
big important note: this function can return0, which means SDL can't determine the page size on this platform. and it will not set an error string to be retrieved withSDL_GetError()in this case! fr fr, don't go callingSDL_GetError()and expecting a lil message, because there isn't one. π
in that case, defaulting to 4096 is often a reasonable option. noted, bestie. β¨
π RETURN VALUE π
returns the size of a single page of memory, in bytes, or 0 if SDL can't determine this information. π
π THREAD SAFETY π
it is safe to call this function from any thread. go off, multithreaded queen. π«Ά
β AVAILABILITY β
this function is available since SDL 3.4.0. she's been here a minute. iconic.
Simple Directmedia Layer π SDL 3.4.18 β that's the source and the version, mwah, and SDL_GetSystemPageSize(3) is the page you're reading. bye bestie, go check your page size ππ§ββοΈ
π¦ 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