ref: ce0b77e2b9bd4669844d0356f8e49d2f4878bac8
parent: a5bce84600f797996c630a0b3cd192adb3c0eb91
author: cinap_lenrek <[email protected]>
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++){