kernel: dont double ptemap size in newseg()

this doubling affects all segment types, not just bss.
(tho text/data are usually small...)

and theres no telling if the segment will actually
grow in the future justifying the reduction of memmove
overhead in ibrk().

some ape programs are approaching the 16mb ssegmap size
so that code might trigger.

removing the smarts...
This commit is contained in:
cinap_lenrek 2014-02-03 20:04:43 +01:00
parent 6a55790197
commit ccfb6168c8

View file

@ -66,7 +66,6 @@ newseg(int type, uintptr base, ulong size)
mapsize = ROUND(size, PTEPERTAB)/PTEPERTAB;
if(mapsize > nelem(s->ssegmap)){
mapsize *= 2;
if(mapsize > (SEGMAPSIZE*PTEPERTAB))
mapsize = (SEGMAPSIZE*PTEPERTAB);
s->map = smalloc(mapsize*sizeof(Pte*));