SDL_GetSystemRAM(3)

πŸ’– SDL_GetSystemRAM(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_GetSystemRAM 🫢


✨ NAME ✨

SDL_GetSystemRAM β€” literally just tells you how much RAM your system has configured. that's it. that's the whole job. and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_cpuinfo.h>

int SDL_GetSystemRAM(void);

no args, no drama, no chaos. she takes void and she takes it proudly ✨


πŸ¦‹ RETURN VALUE πŸ¦‹

she hands you back an int β€” the amount of RAM configured in the system, measured in MiB πŸ’Ύ

so like. if you get 16384 back, that's 16384 MiB. do with that information what you will, bestie. math is your friend, i believe in you 🌈


πŸ’œ THREAD SAFETY πŸ’œ

it is safe to call this function from any thread 🧚

no locks, no "only from the main thread", no little asterisk of doom. call it from wherever. she's chill like that. iconic behaviour, honestly πŸ‘‘


⭐ AVAILABILITY ⭐

this function has been available since SDL 3.2.0 πŸŽ€

if you're on something older than that... girl. upgrade. i'm not mad, i'm just disappointed πŸ™ˆ


and that's the whole page, no notes πŸ’–

Simple Directmedia Layer β€” SDL 3.4.18 β€” and yeah, the same SDL_GetSystemRAM(3) you just read about. mwah, go check your RAM, love u, bye πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from