diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-03-18 20:12:29 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-03-18 20:12:29 +0100 |
commit | 8745e29e15ac31945c5711637879b8422ee774ee (patch) | |
tree | 58476f07dd97b61e80998ae82ef52bba0b4632a4 /sys/src/9/pc/main.c | |
parent | 129408103cd32e005de07956f5471fbf6404341e (diff) |
make pc kernels graphics image memory pool unlimited by default, add *imagemaxmb= kernel parameter
Diffstat (limited to 'sys/src/9/pc/main.c')
-rw-r--r-- | sys/src/9/pc/main.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/src/9/pc/main.c b/sys/src/9/pc/main.c index a1ae7a918..2fecf5df0 100644 --- a/sys/src/9/pc/main.c +++ b/sys/src/9/pc/main.c @@ -415,7 +415,7 @@ confinit(void) * 4MB on the first Image chunk allocation. */ if(conf.npage*BY2PG < 16*MB) - imagmem->minarena = 4*1024*1024; + imagmem->minarena = 4*MB; } /* @@ -440,13 +440,16 @@ confinit(void) + conf.nswap + conf.nswppo*sizeof(Page*); mainmem->maxsize = kpages; - if(!cpuserver){ - /* - * give terminals lots of image memory, too; the dynamic - * allocation will balance the load properly, hopefully. - * be careful with 32-bit overflow. - */ - imagmem->maxsize = kpages; + + /* + * the dynamic allocation will balance the load properly, + * hopefully. be careful with 32-bit overflow. + */ + imagmem->maxsize = mainmem->maxsize; + if(p = getconf("*imagemaxmb")){ + imagmem->maxsize = strtol(p, nil, 0)*MB; + if(imagmem->maxsize > mainmem->maxsize) + imagmem->maxsize = mainmem->maxsize; } } |