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
Kernel Placement Question(?)
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:Kernel Placement Question(?)
Remember you're dealing with hex here.
A gigabyte is 2^30 bytes. 2^30 in binary looks like this:
In hex, that looks like this:
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?
A gigabyte is 2^30 bytes. 2^30 in binary looks like this:
Code: Select all
0100 0000 0000 0000 0000 0000 0000 0000
Code: Select all
4000 0000
Does this make sense?
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager