aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vmmeter.h
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2006-11-28 12:46:02 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2006-11-28 12:46:02 +0000
commitbad4d172b4512bf80adc9f64dbb4bde74cc6bd98 (patch)
tree54a4571abbdb6a65f55daa94a9fdb8f8253b31fb /sys/sys/vmmeter.h
parent983bba070e7a4d1bd74d4beac2458e5bc9d32d8e (diff)
downloadsrc-bad4d172b4512bf80adc9f64dbb4bde74cc6bd98.tar.gz
src-bad4d172b4512bf80adc9f64dbb4bde74cc6bd98.zip
- Revert signedness type changes to "struct vmtotal"; by making
them unsigned I made the possible overflows hard to detect, and it only saved 1 bit which isn't principal, even less now that the underlying issue with the total of virtual memory has been fixed. (For the record, it will overflow with >=2T of VM total, with 32-bit ints used to keep counters in pages.) - While here, fix printing of other "struct vmtotal" members such as t_rq, t_dw, t_pw, and t_sw as they are also signed. Reviewed by: bde MFC after: 3 days
Notes
Notes: svn path=/head/; revision=164718
Diffstat (limited to 'sys/sys/vmmeter.h')
-rw-r--r--sys/sys/vmmeter.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index a0b8cd24b2a1..793f32d37738 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -191,20 +191,20 @@ vm_paging_needed(void)
/* systemwide totals computed every five seconds */
struct vmtotal {
- uint16_t t_rq; /* length of the run queue */
- uint16_t t_dw; /* jobs in ``disk wait'' (neg priority) */
- uint16_t t_pw; /* jobs in page wait */
- uint16_t t_sl; /* jobs sleeping in core */
- uint16_t t_sw; /* swapped out runnable/short block jobs */
- uint32_t t_vm; /* total virtual memory */
- uint32_t t_avm; /* active virtual memory */
- uint32_t t_rm; /* total real memory in use */
- uint32_t t_arm; /* active real memory */
- uint32_t t_vmshr; /* shared virtual memory */
- uint32_t t_avmshr; /* active shared virtual memory */
- uint32_t t_rmshr; /* shared real memory */
- uint32_t t_armshr; /* active shared real memory */
- uint32_t t_free; /* free memory pages */
+ int16_t t_rq; /* length of the run queue */
+ int16_t t_dw; /* jobs in ``disk wait'' (neg priority) */
+ int16_t t_pw; /* jobs in page wait */
+ int16_t t_sl; /* jobs sleeping in core */
+ int16_t t_sw; /* swapped out runnable/short block jobs */
+ int32_t t_vm; /* total virtual memory */
+ int32_t t_avm; /* active virtual memory */
+ int32_t t_rm; /* total real memory in use */
+ int32_t t_arm; /* active real memory */
+ int32_t t_vmshr; /* shared virtual memory */
+ int32_t t_avmshr; /* active shared virtual memory */
+ int32_t t_rmshr; /* shared real memory */
+ int32_t t_armshr; /* active shared real memory */
+ int32_t t_free; /* free memory pages */
};
#endif