Make page_insert() consume the caller's refcnt
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 16 Aug 2016 17:48:49 +0000 (13:48 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commit238a13d8c638200da421573f219dd4ea933a38b0
tree406dcf65ca9ee769e0b8d9dfe09370dfb695f0c1
parentba5170647324fbb177526a205e34dedccd52e6f4
Make page_insert() consume the caller's refcnt

The page refcounting needs to go.  The refcnt was from a time when a page
could have multiple objects tracking it independently.  Nowadays that is
handled higher up, such as in the page cache.

For the most part, the freeing/allocating of the memory is handled higher
up in the stack.  We were already doing this with e.g. procinfo, where we
would free it twice, doing double the work necessary.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/mm.c
kern/src/pmap.c
kern/src/process.c
kern/src/syscall.c