Page 1 of 1

Getting amount of RAM in the computer

Posted: Sun Apr 30, 2017 11:52 am
by obiwac
Hello all!

Tomorrow, I will release the AQUA OS 1.2, and in it, will be widget pages. Further down the line, in future updates, I'd like to add more and more widgets. And for one of them I'd like to be able to show specs, like RAM. For now, I think that just RAM is enough.
So my question is, how can I get the amount of RAM that is in the computer?

Thanks in advance!

Re: Getting amount of RAM in the computer

Posted: Sun Apr 30, 2017 11:58 am
by Ch4ozz
Grub gives you a memory map, count the bytes and round it up

Re: Getting amount of RAM in the computer

Posted: Sun Apr 30, 2017 12:04 pm
by obiwac
That is very true, and quite embarrassing since I just implemented the code for reading the mmap from GRUB! #-o
Just had to multiply all the size values. Derp.

Thanks!