* The kernel's address space is now also a resource that is known to the low
resource manager. * Could be drastically improved, though, by taking the fragmentation into account. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34309 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2008, Ingo Weinhold, [email protected].
|
||||
* Copyright 2005-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2005-2009, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_LOW_RESOURCE_MANAGER_H
|
||||
@@ -22,10 +22,12 @@ enum {
|
||||
B_KERNEL_RESOURCE_PAGES = 0x01, /* physical pages */
|
||||
B_KERNEL_RESOURCE_MEMORY = 0x02, /* reservable memory */
|
||||
B_KERNEL_RESOURCE_SEMAPHORES = 0x04, /* semaphores */
|
||||
B_KERNEL_RESOURCE_ADDRESS_SPACE = 0x08, /* address space */
|
||||
|
||||
B_ALL_KERNEL_RESOURCES = B_KERNEL_RESOURCE_PAGES
|
||||
| B_KERNEL_RESOURCE_MEMORY
|
||||
| B_KERNEL_RESOURCE_SEMAPHORES
|
||||
| B_KERNEL_RESOURCE_ADDRESS_SPACE
|
||||
};
|
||||
|
||||
typedef void (*low_resource_func)(void *data, uint32 resources, int32 level);
|
||||
|
||||
@@ -115,6 +115,7 @@ void vm_get_info(struct system_memory_info *info);
|
||||
uint32 vm_num_page_faults(void);
|
||||
off_t vm_available_memory(void);
|
||||
off_t vm_available_not_needed_memory(void);
|
||||
size_t vm_kernel_address_space_left(void);
|
||||
|
||||
status_t vm_memset_physical(addr_t address, int value, size_t length);
|
||||
status_t vm_memcpy_from_physical(void* to, addr_t from, size_t length,
|
||||
|
||||
Reference in New Issue
Block a user