grow memory in kl in the same way as the other ?l (larger chunks allocated each time if existing sbrk'd space is large). Reference: /n/sources/patch/applied/kl-obj-grow Date: Fri Mar 2 17:57:47 CET 2007 Signed-off-by: forsyth@vitanuova.com --- /sys/src/cmd/kl/obj.c Fri Mar 2 17:56:20 2007 +++ /sys/src/cmd/kl/obj.c Fri Mar 2 17:56:16 2007 @@ -979,16 +979,23 @@ gethunk(void) { char *h; + long nh; - h = mysbrk((int)NHUNK); + nh = NHUNK; + if(tothunk >= 5L*NHUNK) { + nh = 5L*NHUNK; + if(tothunk >= 25L*NHUNK) + nh = 25L*NHUNK; + } + h = mysbrk(nh); if(h == (char *)-1) { diag("out of memory"); errorexit(); } hunk = h; - nhunk = NHUNK; - tothunk += NHUNK; + nhunk = nh; + tothunk += nh; } void