git: 9front

Download patch

ref: 420c7545c8260954be15e83a26595e2e0bd00f1c
parent: e48d5193d2331c2865e180698024e2af802cea43
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Aug 16 13:26:12 EDT 2014

kernel: xinit() use ulong for page counts, cleanup

--- a/sys/src/9/port/xalloc.c
+++ b/sys/src/9/port/xalloc.c
@@ -42,12 +42,12 @@
 void
 xinit(void)
 {
-	int i, n, upages, kpages;
-	ulong maxpages;
+	ulong maxpages, kpages, n;
 	uintptr size;
 	Confmem *m;
 	Pallocmem *pm;
 	Hole *h, *eh;
+	int i;
 
 	eh = &xlists.hole[Nhole-1];
 	for(h = xlists.hole; h < eh; h++)
@@ -55,8 +55,7 @@
 
 	xlists.flist = xlists.hole;
 
-	upages = conf.upages;
-	kpages = conf.npage - upages;
+	kpages = conf.npage - conf.upages;
 
 	pm = palloc.mem;
 	for(i=0; i<nelem(conf.mem); i++){
--