git: e1979b45b637 - main - vm_object: Assert that overcommit charge is released in the object dtor
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Jul 2022 13:10:39 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e1979b45b63725972d394562f95d89f8cc9a0bb4 commit e1979b45b63725972d394562f95d89f8cc9a0bb4 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-07-12 12:53:05 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-07-12 13:10:15 +0000 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 --- sys/vm/vm_object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index efd646cf52e0..4272a734b233 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -204,6 +204,9 @@ vm_object_zdtor(void *mem, int size, void *arg) KASSERT(object->type == OBJT_DEAD, ("object %p has non-dead type %d", 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