Page 1 of 1
memory size
Posted: Wed Aug 30, 2006 8:52 am
by xyjamepa
Hello
how can i get the size of the memory without using GRUB?
my os 32bit pmode.
thanx
Re:memory size
Posted: Wed Aug 30, 2006 9:29 am
by Pype.Clicker
there should be plenty of methods described in the
FAQ, including asking the BIOS, etc.
Re:memory size
Posted: Wed Aug 30, 2006 9:34 am
by João Jerónimo
abuashraf wrote:
Hello
how can i get the size of the memory without using GRUB?
my os 32bit pmode.
thanx
Use GRUB!
I don't need because I use grub, but if you really want to do that, you can use BIOS calls (execute them in Real Mode and then save the amount of memory in a structure you can access later) or probe memory directly (PMode)...
It's explained in the FAQ:
http://www.mega-tokyo.com/osfaq/How%20do%20I%20determine%20the%20amount%20of%20RAM%3F
JJ
Re:memory size
Posted: Wed Aug 30, 2006 11:22 am
by Combuster
afaik in PMode, you have two alternatives:
- Direct probing
- V8086 (or any other form of realmode emulation)
Direct probing can be hazardous and v8086 mode is annoying to program (or even nonexistant if you're up to 64 bits).
So basically you're sortof expected to do it by GRUB or by some ProprietaryBootLoader, but it can be done in PMode. Not that anybody here seems to like it.
<insert faq link here>