[vm > vm.h]
struct page
์์ [vm > vm.c]
static unsigned vm_hash_func(const struct hash_elem *e, void *aux)
๊ตฌํ
ํด์ ํ
์ด๋ธ์์ ํ์ด์ง ์ํธ๋ฆฌ๋ฅผ ํด์ํ๊ธฐ ์ํ ํด์ ํจ์
static bool vm_less_func(const struct hash_elem *a, const struct hash_elem *b)
๊ตฌํ
ํด์ ํ
์ด๋ธ์์ ํ์ด์ง ์ํธ๋ฆฌ๋ฅผ ๋น๊ตํ๊ธฐ ์ํ ๋น๊ต ํจ์
void supplemental_page_table_init (struct supplemental_page_table *spt)
์์
supplemental page table์ ์ด๊ธฐํํ๋ ํจ์
spt_find_page (struct supplemental_page_table *spt, void *va)
์์
์ฃผ์ด์ง spt์์ va(virtual address)์ ํด๋นํ๋ ๊ตฌ์กฐ์ฒด page๋ฅผ ์ฐพ๋ ํจ์
bool spt_insert_page (struct supplemental_page_table *spt, struct page *page)
์์
struct page๋ฅผ ์ฃผ์ด์ง spt์ ์ฝ์
ํ๋ ํจ์
static struct frame *vm_get_frame (void)
์์
palloc_get_page๋ฅผ ํธ์ถํ์ฌ ์ ์ ํ์์ ์ ๋ฌผ๋ฆฌ ํ์ด์ง๋ฅผ ๊ฐ์ ธ์ค๋ ํจ์