From 051df828de0ee7c6055c650e9ecd53a7d2413e89 Mon Sep 17 00:00:00 2001 From: andre Date: Thu, 29 Nov 2012 07:30:42 +0000 Subject: 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 --- sys/sys/mbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/sys') 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; -- cgit v1.1