Page Frame Allocation - where does my kernel reside?
Posted: Sun Oct 25, 2015 8:27 am
I'm currently setting up page frame allocation. For that purpose i got a memory map from grub.
It gave me 2 usable chunks of memory
base 0x0 length 0x9fc00
base 0x100000 length 0x7efe000
but my kernel's code & data is inside of the second chunk.
My question is: how do i know which space is "occupied"? So how to find out how much memory my kernels code&data use?
Of course i could reserve an arbitrary amount of memory "just to be sure" but what if my kernel ever exceeds this point?
To solve this i would need a pointer to "the end" of my kernel. How to do this?
Thanks in advance. Every advice is welcome
It gave me 2 usable chunks of memory
base 0x0 length 0x9fc00
base 0x100000 length 0x7efe000
but my kernel's code & data is inside of the second chunk.
My question is: how do i know which space is "occupied"? So how to find out how much memory my kernels code&data use?
Of course i could reserve an arbitrary amount of memory "just to be sure" but what if my kernel ever exceeds this point?
To solve this i would need a pointer to "the end" of my kernel. How to do this?
Thanks in advance. Every advice is welcome