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:
parent
d096f2f5a8
commit
c0be75a58a
@ -608,6 +608,9 @@ pmap_resident_count_dec(pmap_t pmap, int count)
|
|||||||
{
|
{
|
||||||
|
|
||||||
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
|
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;
|
pmap->pm_stats.resident_count -= count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user