diff options
author | bms <bms@FreeBSD.org> | 2003-10-06 01:47:12 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2003-10-06 01:47:12 +0000 |
commit | d8d01a1fa74aaeb8f9c01655002588c21197bddd (patch) | |
tree | 008a39b1576b985c04df774cca557ae9a75edfd1 /sys/vm | |
parent | 1ac708bd28fe01cd0f219e624441c78612dff7eb (diff) | |
download | FreeBSD-src-d8d01a1fa74aaeb8f9c01655002588c21197bddd.zip FreeBSD-src-d8d01a1fa74aaeb8f9c01655002588c21197bddd.tar.gz |
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
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 */ |