mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
Apparently SuSE 9.1's X distribution uses even bigger
buffers than the standard ones. 64kB appears to be enough for a stack in that case, but let's just go nuts and make the stacks enormous, so that it takes a few more doublings of X's stack needs before we run into this problem again. The VM system should take care of not actually using most of the memory anyway.
This commit is contained in:
parent
8327d41981
commit
a0e8d02d09
4 changed files with 5 additions and 4 deletions
|
@ -21,7 +21,8 @@ __xtoplan9kbd(XEvent *e)
|
||||||
|
|
||||||
if(e->xany.type != KeyPress)
|
if(e->xany.type != KeyPress)
|
||||||
return -1;
|
return -1;
|
||||||
needstack(20*1024); /* X has some *huge* buffers in openobject */
|
needstack(64*1024); /* X has some *huge* buffers in openobject */
|
||||||
|
/* and they're even bigger on SuSE */
|
||||||
XLookupString((XKeyEvent*)e,NULL,0,&k,NULL);
|
XLookupString((XKeyEvent*)e,NULL,0,&k,NULL);
|
||||||
if(k == XK_Multi_key || k == NoSymbol)
|
if(k == XK_Multi_key || k == NoSymbol)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -72,7 +72,7 @@ initkeyboard(char *file)
|
||||||
return nil;
|
return nil;
|
||||||
kc->c = chancreate(sizeof(Rune), 20);
|
kc->c = chancreate(sizeof(Rune), 20);
|
||||||
chansetname(kc->c, "kbdc");
|
chansetname(kc->c, "kbdc");
|
||||||
proccreate(_ioproc, kc, 32768);
|
proccreate(_ioproc, kc, 256*1024);
|
||||||
return kc;
|
return kc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ initmouse(char *file, Image *i)
|
||||||
chansetname(mc->c, "mousec");
|
chansetname(mc->c, "mousec");
|
||||||
mc->resizec = chancreate(sizeof(int), 2);
|
mc->resizec = chancreate(sizeof(int), 2);
|
||||||
chansetname(mc->resizec, "resizec");
|
chansetname(mc->resizec, "resizec");
|
||||||
proccreate(_ioproc, mc, 32768);
|
proccreate(_ioproc, mc, 256*1024);
|
||||||
return mc;
|
return mc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -578,7 +578,7 @@ main(int argc, char **argv)
|
||||||
p = procalloc();
|
p = procalloc();
|
||||||
_threadsetproc(p);
|
_threadsetproc(p);
|
||||||
if(mainstacksize == 0)
|
if(mainstacksize == 0)
|
||||||
mainstacksize = 65536;
|
mainstacksize = 256*1024;
|
||||||
_threadcreate(p, threadmainstart, nil, mainstacksize);
|
_threadcreate(p, threadmainstart, nil, mainstacksize);
|
||||||
scheduler(p);
|
scheduler(p);
|
||||||
_threaddaemonize();
|
_threaddaemonize();
|
||||||
|
|
Loading…
Reference in a new issue