kernel: remove wrong and needles mapsize check in newseg() (thanks Yoann Padioleau)
This commit is contained in:
parent
5ab9f9c621
commit
0aa3af0934
|
@ -66,8 +66,6 @@ newseg(int type, uintptr base, ulong size)
|
||||||
|
|
||||||
mapsize = ROUND(size, PTEPERTAB)/PTEPERTAB;
|
mapsize = ROUND(size, PTEPERTAB)/PTEPERTAB;
|
||||||
if(mapsize > nelem(s->ssegmap)){
|
if(mapsize > nelem(s->ssegmap)){
|
||||||
if(mapsize > (SEGMAPSIZE*PTEPERTAB))
|
|
||||||
mapsize = (SEGMAPSIZE*PTEPERTAB);
|
|
||||||
s->map = smalloc(mapsize*sizeof(Pte*));
|
s->map = smalloc(mapsize*sizeof(Pte*));
|
||||||
s->mapsize = mapsize;
|
s->mapsize = mapsize;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue