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:
@@ -657,7 +657,8 @@ typedef struct {
|
||||
int64 kernel_version; /* version of this kernel */
|
||||
|
||||
bigtime_t _busy_wait_time; /* reserved for whatever */
|
||||
int32 pad[4]; /* just in case... */
|
||||
int32 cached_pages;
|
||||
int32 pad[3]; /* just in case... */
|
||||
} system_info;
|
||||
|
||||
/* system private, use macro instead */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2002-2008, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -138,6 +138,8 @@ status_t vm_map_page(struct vm_area *area, struct vm_page *page, addr_t address,
|
||||
status_t vm_get_physical_page(addr_t paddr, addr_t *vaddr, uint32 flags);
|
||||
status_t vm_put_physical_page(addr_t vaddr);
|
||||
|
||||
off_t vm_get_available_memory(void);
|
||||
|
||||
// user syscalls
|
||||
area_id _user_create_area(const char *name, void **address, uint32 addressSpec,
|
||||
size_t size, uint32 lock, uint32 protection);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007, Axel Dörfler, [email protected].
|
||||
* Copyright 2002-2008, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -33,6 +33,7 @@ void vm_page_requeue(struct vm_page *page, bool tail);
|
||||
// get some data about the number of pages in the system
|
||||
size_t vm_page_num_pages(void);
|
||||
size_t vm_page_num_free_pages(void);
|
||||
size_t vm_page_num_available_pages(void);
|
||||
|
||||
status_t vm_page_write_modified_pages(struct vm_cache *cache, bool fsReenter);
|
||||
void vm_page_schedule_write_page(struct vm_page *page);
|
||||
|
||||
Reference in New Issue
Block a user