]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use M_NEXTFIT in memguard(9).
authormarkj <markj@FreeBSD.org>
Sat, 18 May 2019 02:02:14 +0000 (02:02 +0000)
committermarkj <markj@FreeBSD.org>
Sat, 18 May 2019 02:02:14 +0000 (02:02 +0000)
commit43a786b5597ee034ff85c5dc0ba0bba946c36ec7
tree509bbd1c66d971c410ddf57e07d66cfce228c85d
parent7d39a491bfd3fb599c6391bdcae4d82fb494f0d4
Use M_NEXTFIT in memguard(9).

memguard(9) wants to avoid reuse of freed addresses for as long as
possible.  Previously it maintained a racily updated cursor which was
passed to vmem_xalloc(9) as the minimum address.  However, vmem will
not in general return the lowest free address in the arena, so this
trick only really works until the cursor has wrapped around the first
time.

Reported by: alc
Reviewed by: alc
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D17227
sys/vm/memguard.c