TacOS
0.2
|
#include <types.h>
Aller au code source de ce fichier.
Structures de données | |
struct | slab |
a slab of pages. Plus de détails... | |
struct | slabs_list |
struct | virtual_mem |
Fonctions | |
void | init_vmm (struct virtual_mem *kvm) |
void | init_process_vm (struct virtual_mem *vm, int init_nb_pages) |
unsigned int | allocate_new_page (struct virtual_mem *vm, void **alloc, int u_s) |
Allocation d'une nouvelle page. Plus de détails... | |
unsigned int | allocate_new_pages (struct virtual_mem *vm, unsigned int nb_pages, void **alloc, int u_s) |
Alloue nb_pages pages qui sont placé en espace contigüe de la mémoire virtuelle. Plus de détails... | |
int | unallocate_page (struct virtual_mem *vm, void *page) |
unsigned int | calculate_min_pages (size_t size) |
void | vmm_print_heap (struct virtual_mem *vm) |
vaddr_t | get_linear_address (int dir, int table, int offset) |
void | sys_vmm (uint32_t min_size, void **alloc, size_t *real_alloc_size) |
struct page_table_entry * | get_pte (int dir, int table) |
paddr_t | vmm_get_page_paddr (vaddr_t vaddr) |
int | map (paddr_t phys_page_addr, vaddr_t virt_page_addr, int u_s) |
void | unmap (vaddr_t virt_page_addr) |
Copyright (C) 2010, 2011, 2012 - TacOS developers.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
vmm est l'allocateur qui s'occupe de gérer les pages virtuelles du noyau. Il se base sur l'algorithme first fit (premier emplacement de taille suffisante)
Maintien la liste des espaces libres et des espaces occupés (slabs).
unsigned int allocate_new_page | ( | struct virtual_mem * | vm, |
void ** | alloc, | ||
int | u_s | ||
) |
vm | |
alloc | |
u_s | 1 si accessible en userspace, 0 sinon. |
unsigned int allocate_new_pages | ( | struct virtual_mem * | vm, |
unsigned int | nb_pages, | ||
void ** | alloc, | ||
int | u_s | ||
) |
vm | |
nb_pages | |
alloc | |
u_s | 1 si accessible en userspace, 0 sinon. |
void init_vmm | ( | struct virtual_mem * | kvm | ) |
Initialisation de la VMM.
kvm |