From d9eecde84f40264bc408cbfaed917f107f4a3172 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 17 Apr 2024 11:36:52 -0400 Subject: kernel: vm_map: Handle map-space 'map_count' field Signed-off-by: Ian Moffett --- sys/vm/vm_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cd44c08..9a2fe02 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -83,6 +83,7 @@ vm_mapspace_remove(struct vm_mapspace *ms, struct vm_mapping *mapping) vhash = vm_hash_vaddr(mapping->range.start); mapq = &ms->mtab[vhash % MTAB_ENTRIES]; TAILQ_REMOVE(mapq, mapping, link); + --ms->map_count; } /* @@ -133,6 +134,7 @@ vm_mapspace_insert(struct vm_mapspace *ms, struct vm_mapping *mapping) q = &ms->mtab[vhash % MTAB_ENTRIES]; TAILQ_INSERT_HEAD(q, mapping, link); + ++ms->map_count; } /* -- cgit v1.2.3