kernel/vm: Drop vm_page_num_available_pages.

Nothing uses it, and it isn't correct anyway: vm_page_num_free_pages()
now includes cached pages, too, while vm_available_memory() includes
not just available memory pages but also swap.
This commit is contained in:
Augustin Cavalier 2024-12-26 13:46:45 -05:00
parent a26220df71
commit 8bb382decf
2 changed files with 0 additions and 15 deletions

View File

@ -51,7 +51,6 @@ void vm_page_requeue(struct vm_page *page, bool tail);
// get some data about the number of pages in the system
page_num_t vm_page_num_pages(void);
page_num_t vm_page_num_free_pages(void);
page_num_t vm_page_num_available_pages(void);
page_num_t vm_page_num_unused_pages(void);
void vm_page_get_stats(system_info *info);
phys_addr_t vm_page_max_address();

View File

@ -4167,20 +4167,6 @@ vm_page_num_pages(void)
}
/*! There is a subtle distinction between the page counts returned by
this function and vm_page_num_free_pages():
The latter returns the number of pages that are completely uncommitted,
whereas this one returns the number of pages that are available for
use by being reclaimed as well (IOW it factors in things like cache pages
as available).
*/
page_num_t
vm_page_num_available_pages(void)
{
return vm_available_memory() / B_PAGE_SIZE;
}
page_num_t
vm_page_num_free_pages(void)
{