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

This commit is contained in:
cinap_lenrek 2012-10-06 07:05:08 +02:00
parent 349abfcd79
commit 83ffc3a1da

View file

@ -461,7 +461,7 @@ confinit(void)
* 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)