Using PML4 to keep track of free memory
- IanSeyler
- Member
- Posts: 329
- Joined: Mon Jul 28, 2008 9:46 am
- Location: Ontario, Canada
- GitHub: https://github.com/ReturnInfinity
- Contact:
Using PML4 to keep track of free memory
The title says it all.. Is it possible (or rather, a good idea) to use the existing PML4 to keep track of free pages of memory?
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Re: Using PML4 to keep track of free memory
I'm not sure I follow. You mean mapping all the free physical pages in some address space?
Re: Using PML4 to keep track of free memory
Hi,
I think you are asking if you can keep track of whether a physical page is free or not by checking whether it appears in the paging structures themselves? If so, that's a Bad Idea as it involves walking the entire contents of all paging structures for all processes, before you can even begin to determine whether a given page is free.
Cheers,
Adam
I think you are asking if you can keep track of whether a physical page is free or not by checking whether it appears in the paging structures themselves? If so, that's a Bad Idea as it involves walking the entire contents of all paging structures for all processes, before you can even begin to determine whether a given page is free.
Cheers,
Adam