* Moved the incrementing/decrementing of vm_page::wired_count into
dedicated functions. * Introduced gMappedPagesCount variable which counts the total number of physical pages that are mapped. * Added vm_page_get_stats() which fills in the memory related part of the system_info structure. Used and cached pages are computed differently, now. The "available" (== not committed) memory is no longer used for the computation as it doesn't say anything about the actually used/free pages (with swap support enabled it is even less meaningful, since we first commit swap space when possible). We do also consider the memory used by the block cache as cached pages, now. All in all these changes should fix the memory statistics reported by get_system_info(), IOW bug #2574. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26837 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
struct kernel_args;
|
||||
|
||||
extern int32 gMappedPagesCount;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -34,6 +35,7 @@ void vm_page_requeue(struct vm_page *page, bool tail);
|
||||
size_t vm_page_num_pages(void);
|
||||
size_t vm_page_num_free_pages(void);
|
||||
size_t vm_page_num_available_pages(void);
|
||||
void vm_page_get_stats(system_info *info);
|
||||
|
||||
status_t vm_page_write_modified_page_range(struct VMCache *cache,
|
||||
uint32 firstPage, uint32 endPage);
|
||||
|
||||
Reference in New Issue
Block a user