Page 1 of 1
Using PML4 to keep track of free memory
Posted: Fri May 17, 2013 8:57 am
by IanSeyler
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?
Re: Using PML4 to keep track of free memory
Posted: Fri May 17, 2013 11:37 am
by sortie
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
Posted: Fri May 17, 2013 3:22 pm
by AJ
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