memguard(9) rewrite, part 2

mdf at FreeBSD.org mdf at FreeBSD.org
Mon Aug 2 16:19:02 UTC 2010


On Thu, Jul 29, 2010 at 10:01 AM,  <mdf at freebsd.org> wrote:
> Back in March I asked about interest in a memguard(9) redo.  I've had
> the time to get the code to a place I'm pretty happy with, and we've
> successfully used it at work without running into some of the resource
> limitations that the original memguard(9) gave.
>
> http://people.freebsd.org/~mdf/bsd-memguard.diff
>
> The gist of the new implementation is to reserve a lot of KVA for
> memguard(9) to use, and then to avoid re-using KVA as long as
> possible.  Rather than keep the physical pages around, though, on
> free(9) the pages are returned to the system.  The KVA is allocated
> using vm_map_findspace() from a current pointer into the memguard_map,
> which is incremented until the end of the map is encountered, at which
> time it wraps.  This is a "free" way to avoid re-use of KVA as long as
> possible; any other scheme requires more than O(1) data to track what
> has been used.

I have a diff of my proposed man page update at
http://people.freebsd.org/~mdf/bsd-memguard.9.diff ; my mdoc skills
are in their infancy so any suggestions are welcome.

Thanks,
matthew


More information about the freebsd-arch mailing list