al_get_ram_size(3)
π NAME π
okay so this is al_get_ram_size(3) β Allegro 5 API β straight out of the Allegro reference manual / Library Functions Manual. She's iconic, she's here to spill the tea about RAM, and we're obsessed. β¨
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
int al_get_ram_size(void)
π«Ά DESCRIPTION π«Ά
So like, al_get_ram_size() returns the size in MB of the random access memory that the system Allegro is running on has and which could be detected β or a negative number if detection failed. That's the whole vibe check. π
Even if a positive number is returned, it might be that it is not correct. For example, Allegro running on a virtual machine will return the amount of RAM of the VM, and not that of the underlying system. Not me finding out the VM was lying about its whole personality π.
Furthermore, even if the number is correct, this only gives you information about the total physical memory of the system Allegro runs on. The memory available to your program may be less or more than what this function returns due to circumstances such as virtual memory, and other programs that are currently running. It's giving "there's more going on than the number says," fr fr.
Therefore, itβs best to use this for advisory purposes only. It is certainly a bad idea to make your program exclusive to systems for which this function returns a certain βdesirableβ number. Like, do not gatekeep your app based on this one number, bestie β that's not the main character energy we want. π
This function may be called prior to al_install_system(3) or al_init(3). So yes, you can hit her up before the whole system is installed β slay. π¦
πΈ SINCE πΈ
5.1.12 β periodt. π
okay bye bestie π«Ά this little page came from the Allegro reference manual β that's the source/version line β and the footer has no date to report, so consider that your cute little sign-off. π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms