summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-11-29 07:30:42 +0000
committerandre <andre@FreeBSD.org>2012-11-29 07:30:42 +0000
commit051df828de0ee7c6055c650e9ecd53a7d2413e89 (patch)
treedb0ad72c5cb51e20dae6201d488901d1c3ab0f3b /sys/sys
parent4e7a33716c1179fe69e003004da720fb8e43972f (diff)
downloadFreeBSD-src-051df828de0ee7c6055c650e9ecd53a7d2413e89.zip
FreeBSD-src-051df828de0ee7c6055c650e9ecd53a7d2413e89.tar.gz
Using a long is the wrong type to represent the realmem and maxmbufmem
variable as they may overflow on i386/PAE and i386 with > 2GB RAM. Use 64bit quad_t instead. It has broader kernel infrastructure support with TUNABLE_QUAD_FETCH() and qmin/qmax() than other available types. Pointed out by: alc, bde
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mbuf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 8427283..0d0b0d0 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -395,7 +395,7 @@ struct mbstat {
*
* The rest of it is defined in kern/kern_mbuf.c
*/
-extern long maxmbufmem;
+extern quad_t maxmbufmem;
extern uma_zone_t zone_mbuf;
extern uma_zone_t zone_clust;
extern uma_zone_t zone_pack;
OpenPOWER on IntegriCloud