vm_object: Assert that overcommit charge is released in the object dtor
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35780
This commit is contained in:
parent
6b38974085
commit
e1979b45b6
@ -204,6 +204,9 @@ vm_object_zdtor(void *mem, int size, void *arg)
|
|||||||
KASSERT(object->type == OBJT_DEAD,
|
KASSERT(object->type == OBJT_DEAD,
|
||||||
("object %p has non-dead type %d",
|
("object %p has non-dead type %d",
|
||||||
object, object->type));
|
object, object->type));
|
||||||
|
KASSERT(object->charge == 0 && object->cred == NULL,
|
||||||
|
("object %p has non-zero charge %ju (%p)",
|
||||||
|
object, (uintmax_t)object->charge, object->cred));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user