~kris/9p

9hist

60f3c86cf0bc244e9c0ecb2691aedccabd9c7972 — David du Colombier 28 years ago 7d76766
Plan 9 from Bell Labs 1998-04-20
1 files changed, 9 insertions(+), 4 deletions(-)

M pc/main.c
M pc/main.c => pc/main.c +9 -4
@@ 400,15 400,20 @@ confinit(void)
			else
				pcnt = 60;
		}
		/*
		 * Make sure terminals with low memory get at least
		 * 4MB on the first Image chunk allocation.
		 */
		if(conf.npage*BY2PG < 16*MB)
			poolsetparam("Image", 0, 0, 4*1024*1024);
		/*
		 * give terminals lots of image memory, too; the dynamic allocation
		 * will balance the load properly, we hope.
		 * give terminals lots of image memory, too; the dynamic
		 * allocation will balance the load properly, we hope.
		 * be careful with 32-bit overflow.
		 */
		poolsetparam("Image", BY2PG*conf.npage*(100-pcnt)/100, 0, 0);
		poolsetparam("Image", (BY2PG*conf.npage/100)*(100-pcnt), 0, 0);
	}
	poolsetparam("Main", BY2PG*conf.npage*(100-pcnt)/100, 0, 0);
	poolsetparam("Main", (BY2PG*conf.npage/100)*(100-pcnt), 0, 0);

	conf.upages = (conf.npage*pcnt)/100;
	conf.ialloc = ((conf.npage-conf.upages)/2)*BY2PG;