Assert that accounting for the pmap resident pages does not underflow.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2014-01-02 18:49:05 +00:00
parent d096f2f5a8
commit c0be75a58a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260204

View File

@ -608,6 +608,9 @@ pmap_resident_count_dec(pmap_t pmap, int count)
{
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
KASSERT(pmap->pm_stats.resident_count >= count,
("pmap %p resident count underflow %ld %d", pmap,
pmap->pm_stats.resident_count, count));
pmap->pm_stats.resident_count -= count;
}