Applied patch by Rene Gollent:

* Add a cached_pages field to the system_info structure, and change the
  meaning of the used_pages field to not include cached pages.
* Provide the needed info using the new calls vm_get_available_memory(),
  and vm_page_num_available_pages().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24571 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-03-25 11:51:45 +00:00
parent b11e554156
commit 41f8d41647
7 changed files with 34 additions and 7 deletions
+2 -1
View File
@@ -517,9 +517,10 @@ dump_cpus(system_info *info)
static void
dump_mem(system_info *info)
{
printf("%10lu bytes free (used/max %10lu / %10lu)\n",
printf("%10lu bytes free (used/cached/max %10lu / %10lu / %10lu)\n",
B_PAGE_SIZE * (uint32)(info->max_pages - info->used_pages),
B_PAGE_SIZE * (uint32)info->used_pages,
B_PAGE_SIZE * (uint32)info->cached_pages,
B_PAGE_SIZE * (uint32)info->max_pages);
}