Attempt to merge VMRs during mprotect
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 29 Apr 2016 18:26:57 +0000 (14:26 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 2 May 2016 21:11:15 +0000 (17:11 -0400)
commitf99f6781c61a6d7f2b7f4aa494022b494ccb1bd2
tree08f9e806305cb85f3f48b1acef66a521871c3f68
parentf6a6dca8c1cdffd682a8eb5398b886d044c5c730
Attempt to merge VMRs during mprotect

If you do a bunch of mprotects on parts of an mmaped region with different
settings, you'd break it up.  But if we mprotected to make a collection of
regions the same, then we wouldn't merge the VMRs back.

You'd notice this with vmrunkernel - we'd have O(100) VMRs, many of the
adjacent VMRs had the same settings.  Now those ones are merged.

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