kernel: xinit() use ulong for page counts, cleanup
This commit is contained in:
parent
a5bce84600
commit
ce0b77e2b9
1 changed files with 3 additions and 4 deletions
|
@ -42,12 +42,12 @@ static Xalloc xlists;
|
||||||
void
|
void
|
||||||
xinit(void)
|
xinit(void)
|
||||||
{
|
{
|
||||||
int i, n, upages, kpages;
|
ulong maxpages, kpages, n;
|
||||||
ulong maxpages;
|
|
||||||
uintptr size;
|
uintptr size;
|
||||||
Confmem *m;
|
Confmem *m;
|
||||||
Pallocmem *pm;
|
Pallocmem *pm;
|
||||||
Hole *h, *eh;
|
Hole *h, *eh;
|
||||||
|
int i;
|
||||||
|
|
||||||
eh = &xlists.hole[Nhole-1];
|
eh = &xlists.hole[Nhole-1];
|
||||||
for(h = xlists.hole; h < eh; h++)
|
for(h = xlists.hole; h < eh; h++)
|
||||||
|
@ -55,8 +55,7 @@ xinit(void)
|
||||||
|
|
||||||
xlists.flist = xlists.hole;
|
xlists.flist = xlists.hole;
|
||||||
|
|
||||||
upages = conf.upages;
|
kpages = conf.npage - conf.upages;
|
||||||
kpages = conf.npage - upages;
|
|
||||||
|
|
||||||
pm = palloc.mem;
|
pm = palloc.mem;
|
||||||
for(i=0; i<nelem(conf.mem); i++){
|
for(i=0; i<nelem(conf.mem); i++){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue