#include <stdbool.h>#include "threads/palloc.h"#include <hash.h>#include "vm/uninit.h"#include "vm/anon.h"#include "vm/file.h"#include "threads/thread.h"

Go to the source code of this file.
Classes | |
| struct | page |
| struct | frame |
| struct | page_operations |
| struct | supplemental_page_table |
Macros | |
| #define | VM_TYPE(type) ((type) & 7) |
| #define | swap_in(page, v) (page)->operations->swap_in ((page), v) |
| #define | swap_out(page) (page)->operations->swap_out (page) |
| #define | destroy(page) if ((page)->operations->destroy) (page)->operations->destroy (page) |
| #define | vm_alloc_page(type, upage, writable) vm_alloc_page_with_initializer ((type), (upage), (writable), NULL, NULL) |
Enumerations | |
| enum | vm_type { VM_UNINIT = 0 , VM_ANON = 1 , VM_FILE = 2 , VM_PAGE_CACHE = 3 , VM_MARKER_0 = (1 << 3) , VM_MARKER_1 = (1 << 4) , VM_MARKER_END = (1 << 31) } |
Functions | |
| void | supplemental_page_table_init (struct supplemental_page_table *spt) |
| bool | supplemental_page_table_copy (struct supplemental_page_table *dst, struct supplemental_page_table *src) |
| void | supplemental_page_table_kill (struct supplemental_page_table *spt) |
| struct page * | spt_find_page (struct supplemental_page_table *spt, void *va) |
| bool | spt_insert_page (struct supplemental_page_table *spt, struct page *page) |
| void | spt_remove_page (struct supplemental_page_table *spt, struct page *page) |
| void | vm_init (void) |
| bool | vm_try_handle_fault (struct intr_frame *f, void *addr, bool user, bool write, bool not_present) |
| bool | vm_alloc_page_with_initializer (enum vm_type type, void *upage, bool writable, vm_initializer *init, void *aux) |
| void | vm_dealloc_page (struct page *page) |
| bool | vm_claim_page (void *va) |
| enum vm_type | page_get_type (struct page *page) |
| #define vm_alloc_page | ( | type, | |
| upage, | |||
| writable | |||
| ) | vm_alloc_page_with_initializer ((type), (upage), (writable), NULL, NULL) |
| #define VM_TYPE | ( | type | ) | ((type) & 7) |
| enum vm_type |
| Enumerator | |
|---|---|
| VM_UNINIT | |
| VM_ANON | |
| VM_FILE | |
| VM_PAGE_CACHE | |
| VM_MARKER_0 | |
| VM_MARKER_1 | |
| VM_MARKER_END | |

| struct page * spt_find_page | ( | struct supplemental_page_table * | spt, |
| void * | va | ||
| ) |

| bool spt_insert_page | ( | struct supplemental_page_table * | spt, |
| struct page * | page | ||
| ) |
| void spt_remove_page | ( | struct supplemental_page_table * | spt, |
| struct page * | page | ||
| ) |

| bool supplemental_page_table_copy | ( | struct supplemental_page_table * | dst, |
| struct supplemental_page_table * | src | ||
| ) |

| void supplemental_page_table_init | ( | struct supplemental_page_table * | spt | ) |

| void supplemental_page_table_kill | ( | struct supplemental_page_table * | spt | ) |

| bool vm_alloc_page_with_initializer | ( | enum vm_type | type, |
| void * | upage, | ||
| bool | writable, | ||
| vm_initializer * | init, | ||
| void * | aux | ||
| ) |


| bool vm_claim_page | ( | void * | va | ) |
| void vm_dealloc_page | ( | struct page * | page | ) |
| void vm_init | ( | void | ) |


| bool vm_try_handle_fault | ( | struct intr_frame * | f, |
| void * | addr, | ||
| bool | user, | ||
| bool | write, | ||
| bool | not_present | ||
| ) |
