Page 1 of 1

Detecting memory

Posted: Sun Jan 27, 2013 9:40 pm
by BMW
Whats the best way to detect how much memory is installed in the system??? All the BIOS functions have some pathetic limitation where they stop at memory holes above 16MB or something.... or is manual probing the way to go? (the wiki advises against this).

In my os, I give it 128MB of memory, and int 0x15 E801 reports 17.75MB.... thats a waste of time.

Re: Detecting memory

Posted: Sun Jan 27, 2013 10:04 pm
by FallenAvatar
Please search the Wiki properly before posting here...

http://wiki.osdev.org/Detecting_Memory_ ... .3D_0xE820

Re: Detecting memory

Posted: Mon Jan 28, 2013 12:12 pm
by Casm
int 15h, fn 0xe820 will get you a memory map (which you will need), and you can find out the total size of memory by adding up the sizes of the blocks.

http://www.uruk.org/orig-grub/mem64mb.html