Fixes page reference counting wrt to upage_alloc()
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 23 Sep 2010 23:44:06 +0000 (16:44 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:54 +0000 (17:35 -0700)
commitdb33f7124690171a010dfb506184865908022a7f
tree283df0af1cfacd91644547b928ec9252e7d39eb6
parent7ed4888fae9aedc11c202c5ae8283fea2f40e70b
Fixes page reference counting wrt to upage_alloc()

upage_alloc() returns a reference counted page.  page_insert() and
friends will incref it when it stores the reference.  When you are done
using the struct page * that upage_alloc() returned, you must decref.
Just like other pointers and objects.
kern/arch/i686/pmap.c
kern/include/page_alloc.h
kern/src/env.c
kern/src/mm.c
kern/src/page_alloc.c
kern/src/pmap.c
kern/src/syscall.c