diff options
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/pmap.h | 4 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_map.h | 1 |
3 files changed, 11 insertions, 0 deletions
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 */ |