git: 9front

Download patch

ref: 7aa7e7f02b98f63d5d11c9bc3a20fc98ce01934f
parent: 3126a20d607cc856a6a125ebb16a2b952e76cb20
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sat Oct 6 03:05:08 EDT 2012

pc kernel: make imagemem maxsize 10% less of mainmem maxsize

--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -461,7 +461,7 @@
 	 * the dynamic allocation will balance the load properly,
 	 * hopefully. be careful with 32-bit overflow.
 	 */
-	imagmem->maxsize = mainmem->maxsize;
+	imagmem->maxsize = kpages - (kpages/10);
 	if(p = getconf("*imagemaxmb")){
 		imagmem->maxsize = strtol(p, nil, 0)*MB;
 		if(imagmem->maxsize > mainmem->maxsize)
--