From d8d01a1fa74aaeb8f9c01655002588c21197bddd Mon Sep 17 00:00:00 2001 From: bms Date: Mon, 6 Oct 2003 01:47:12 +0000 Subject: Move pmap_resident_count() from the MD pmap.h to the MI pmap.h. Add a definition of pmap_wired_count(). Add a definition of vmspace_wired_count(). Reviewed by: truckman Discussed with: peter --- sys/vm/pmap.h | 4 ++++ sys/vm/vm_map.c | 6 ++++++ sys/vm/vm_map.h | 1 + 3 files changed, 11 insertions(+) (limited to 'sys/vm') diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index a6eff6ef..7adfa75 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -136,5 +136,9 @@ void pmap_activate(struct thread *td); vm_offset_t pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size); void *pmap_kenter_temporary(vm_offset_t pa, int i); void pmap_init2(void); + +#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count) +#define pmap_wired_count(pm) ((pm)->pm_stats.wired_count) + #endif /* _KERNEL */ #endif /* _PMAP_VM_ */ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 4492f9b..6ae9edd 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -477,6 +477,12 @@ vmspace_resident_count(struct vmspace *vmspace) return pmap_resident_count(vmspace_pmap(vmspace)); } +long +vmspace_wired_count(struct vmspace *vmspace) +{ + return pmap_wired_count(vmspace_pmap(vmspace)); +} + /* * vm_map_create: * diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index d1aff1f..1a510d1 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -283,6 +283,7 @@ void vm_map_wakeup(vm_map_t map); _vm_map_lock_downgrade(map, LOCK_FILE, LOCK_LINE) long vmspace_resident_count(struct vmspace *vmspace); +long vmspace_wired_count(struct vmspace *vmspace); #endif /* _KERNEL */ -- cgit v1.1