Report ignored memory pages seperately, thanks to bonefish for the patch review. Closes ticket #6178
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37175 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -699,8 +699,8 @@ typedef struct {
|
||||
int64 bus_clock_speed; /* bus clock speed (Hz) */
|
||||
enum platform_types platform_type; /* type of machine we're on */
|
||||
|
||||
int32 max_pages; /* total # physical pages */
|
||||
int32 used_pages; /* # physical pages in use */
|
||||
int32 max_pages; /* total # of accessible pages */
|
||||
int32 used_pages; /* # of accessible pages in use */
|
||||
int32 page_faults; /* # of page faults */
|
||||
int32 max_sems;
|
||||
int32 used_sems;
|
||||
@@ -717,11 +717,11 @@ typedef struct {
|
||||
int64 kernel_version;
|
||||
|
||||
bigtime_t _busy_wait_time; /* reserved for whatever */
|
||||
|
||||
int32 cached_pages;
|
||||
|
||||
uint32 abi; /* the system API */
|
||||
|
||||
int32 pad[2];
|
||||
int32 ignored_pages; /* # of ignored/inaccessible pages */
|
||||
int32 pad;
|
||||
} system_info;
|
||||
|
||||
/* system private, use macro instead */
|
||||
|
||||
@@ -3625,11 +3625,12 @@ vm_page_get_stats(system_info *info)
|
||||
// can't really be freed in a low memory situation.
|
||||
page_num_t blockCachePages = block_cache_used_memory() / B_PAGE_SIZE;
|
||||
|
||||
info->max_pages = sNumPages - sNonExistingPages + sIgnoredPages;
|
||||
info->used_pages = gMappedPagesCount - blockCachePages + sIgnoredPages;
|
||||
info->max_pages = sNumPages - sNonExistingPages;
|
||||
info->used_pages = gMappedPagesCount - blockCachePages;
|
||||
info->cached_pages = info->max_pages >= free + info->used_pages
|
||||
? info->max_pages - free - info->used_pages : 0;
|
||||
info->page_faults = vm_num_page_faults();
|
||||
info->ignored_pages = sIgnoredPages;
|
||||
|
||||
// TODO: We don't consider pages used for page directories/tables yet.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user