kern
diff src/vm.c @ 74:d3601789d638
fixed cleanup_vm to avoid cleaning up kernel pages
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 15 Oct 2011 08:06:58 +0300 |
parents | 3941e82b07f2 |
children | 0fe6eef16335 |
line diff
1.1 --- a/src/vm.c Sat Oct 15 08:06:10 2011 +0300 1.2 +++ b/src/vm.c Sat Oct 15 08:06:58 2011 +0300 1.3 @@ -814,6 +814,12 @@ 1.4 rb_begin(&p->vmmap); 1.5 while((vmnode = rb_next(&p->vmmap))) { 1.6 struct vm_page *page = vmnode->data; 1.7 + 1.8 + /* skip kernel pages obviously */ 1.9 + if(!(page->flags & PG_USER)) { 1.10 + continue; 1.11 + } 1.12 + 1.13 if(--page->nref <= 0) { 1.14 /* free the physical page if nref goes to 0 */ 1.15 free_phys_page(PAGE_TO_ADDR(page->ppage));