diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-08-16 17:26:12 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-08-16 17:26:12 +0200 |
commit | ce0b77e2b9bd4669844d0356f8e49d2f4878bac8 (patch) | |
tree | f20750b19cd6079e54861ccecd156ca27c9d2464 /sys/src/9/port/xalloc.c | |
parent | a5bce84600f797996c630a0b3cd192adb3c0eb91 (diff) |
kernel: xinit() use ulong for page counts, cleanup
Diffstat (limited to 'sys/src/9/port/xalloc.c')
-rw-r--r-- | sys/src/9/port/xalloc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/9/port/xalloc.c b/sys/src/9/port/xalloc.c index 62afcac37..15a5327e6 100644 --- a/sys/src/9/port/xalloc.c +++ b/sys/src/9/port/xalloc.c @@ -42,12 +42,12 @@ static Xalloc xlists; 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 @@ xinit(void) 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++){ |