1 #ifndef_LINUX_VMM_H 2 #define_LINUX_VMM_H 3
4 /* 5 * Linux kernel virtual memory manager primitives. 6 * The idea being to have a "virtual" mm in the same way 7 * we have a virtual fs - giving a cleaner interface to the 8 * mm details, and allowing different kinds of memory mappings 9 * (from shared memory to executable loading to arbitrary 10 * mmap() functions). 11 */ 12
13 /* 14 * This struct defines a memory VMM memory area. There is one of these 15 * per VM-area/task. A VM area is any part of the process virtual memory 16 * space that has a special rule for the page-fault handlers (ie a shared 17 * library, the executable area etc). 18 */ 19 structvm_area_struct{ 20 unsignedlong vm_start; /* VM area parameters */ 21 unsignedlong vm_end;
22 structvm_area_struct * vm_next; /* ordered linked list */ 23 structvm_area_struct * vm_share; /* circular linked list */ 24 structinode * vm_inode;
25 unsignedlong vm_offset;
26 structvm_operations_struct * vm_ops;
27 unsignedlong vm_flags;
28 };
29
30 structvm_operations_struct{ 31 void (*open)(structtask_struct * tsk, structvm_area_struct * area);
32 void (*close)(structtask_struct * tsk, structvm_area_struct * area);
33 void (*nopage)(structtask_struct * tsk, structvm_area_struct * area, unsignedlongaddress);
34 void (*wppage)(structtask_struct * tsk, structvm_area_struct * area, unsignedlongaddress);
35 };
36
37 #endif