Page 1 of 1

Kernel Placement Question(?)

Posted: Wed Aug 31, 2005 7:30 pm
by Warrior
Hello,

I've been thinking about putting my kernel at the 3GB mark and
leaving anything below for programs and DLLs

Now, my question is a lot of code referrs to putting it there (higher half barebones) as 0xC000000, but shouldn't it be like this

[pre]
0x0 - 0x1000000 = 1 GB
0x1000000 - 0x2000000 = 2GB
0x2000000 - 0x3000000 = 3GB
0x3000000 - 0x4000000 = 4GB
[/pre]
?

I'm just confused about this and I like to be sure of what I am actually writing when I program.

Any help is as always, appreciated.

Thanks,
Nelson

Re:Kernel Placement Question(?)

Posted: Wed Aug 31, 2005 9:43 pm
by Colonel Kernel
Remember you're dealing with hex here.

A gigabyte is 2^30 bytes. 2^30 in binary looks like this:

Code: Select all

0100 0000 0000 0000 0000 0000 0000 0000
In hex, that looks like this:

Code: Select all

4000 0000
2 gigs is 2^31, which in binary is 1000 etc... So in hex, that'd be 8000 0000. 3 gigs is 2^31 + 2^30, which in binary is 1100 etc... In hex, it's C000 0000.

Does this make sense?

Re:Kernel Placement Question(?)

Posted: Wed Aug 31, 2005 9:52 pm
by Warrior
Hmm..I think so, thanks for the explination.