Date: Fri, 30 Aug 2002 17:55:27 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Peter Wemm <peter@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/alpha/alpha machdep.c src/sys/alpha/include md_var.h src/sys/alpha/osf1 osf1_misc.c src/sys/i386/i386 machdep.c src/sys/i386/include md_var.h src/sys/ia64/ia64 Message-ID: <20020830174914.H2794-100000@gamplex.bde.org> In-Reply-To: <200208300404.g7U44c6C041012@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 29 Aug 2002, Peter Wemm wrote: > peter 2002/08/29 21:04:37 PDT > > Modified files: > sys/alpha/alpha machdep.c > sys/alpha/include md_var.h > sys/alpha/osf1 osf1_misc.c > sys/i386/i386 machdep.c > sys/i386/include md_var.h > sys/ia64/ia64 machdep.c > sys/ia64/include md_var.h > sys/kern subr_param.c vfs_bio.c > sys/pc98/i386 machdep.c > sys/powerpc/include md_var.h > sys/powerpc/powerpc machdep.c > sys/sparc64/include md_var.h > sys/sparc64/sparc64 machdep.c > sys/sys buf.h systm.h > sys/vm vm_init.c > Log: > Change hw.physmem and hw.usermem to unsigned long like they used to be > in the original hardwired sysctl implementation. > > The buf size calculator still overflows an integer on machines with large > KVA (eg: ia64) where the number of pages does not fit into an int. Use > 'long' there. > > Change Maxmem and physmem and related variables to 'long', mostly for > completeness. Machines are not likely to overflow 'int' pages in the > near term, but then again, 640K ought to be enough for anybody. This > comes for free on 32 bit machines, so why not? Because it is pessimal on 32-bit machines with correctly sized longs (2 * 32 bits), and doesn't move us any closer to using the correct types, which should be something like vm_size_t, but perhaps a little smaller. In practice, 32 bits is the best type for page counts on i386's. vm_size_t might need to be larger to physical memory sizes. This change has some technical problems such as a fatal printf format error on i386's. I will send more details privately. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020830174914.H2794-100000>