1 /* 2 * Copyright 2002-2008, Haiku. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 6 * Distributed under the terms of the NewOS License. 7 */ 8 #ifndef _KERNEL_VM_VM_PRIV_H 9 #define _KERNEL_VM_VM_PRIV_H 10 11 12 #include <vm/vm_types.h> 13 14 15 // reserved area definitions 16 #define RESERVED_AREA_ID -1 17 #define RESERVED_AVOID_BASE 0x01 18 19 // page attributes (in addition to B_READ_AREA etc.) 20 #define PAGE_MODIFIED 0x1000 21 #define PAGE_ACCESSED 0x2000 22 #define PAGE_PRESENT 0x4000 23 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 // Should only be used by vm internals 30 status_t vm_page_fault(addr_t address, addr_t faultAddress, bool isWrite, 31 bool isUser, addr_t *newip); 32 void vm_unreserve_memory(size_t bytes); 33 status_t vm_try_reserve_memory(size_t bytes, bigtime_t timeout); 34 void vm_schedule_page_scanner(uint32 target); 35 status_t vm_daemon_init(void); 36 37 const char *page_state_to_string(int state); 38 // for debugging purposes only 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif /* _KERNEL_VM_VM_PRIV_H */ 45