Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!apple!bloom-beacon!ROVER.UMD.EDU!jonnyg From: jonnyg@ROVER.UMD.EDU (Jon Greenblatt) Newsgroups: comp.windows.x Subject: Resource limits and backing store..... Message-ID: <8812110144.AA15351@rover.UMD.EDU> Date: 11 Dec 88 01:44:30 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 50 I have been having trouble with the server running out of memory when running a large program using backing store. My default datasize is set to 6 meg but this is not enough when running some realy hungry X programs such as XPS. BTW XPS is available from expo.lcs.mit.edu via anonymous ftp in /oldcontrib/xps.tar.Z. I am using xdm to start my server and have come up with this temporary work around: I call xdm from the folowing program: /* biglimit.c */ #include #include main(argc,argv) char *argv[]; { struct rlimit dlimit, slimit; if (argc > 1) { getrlimit(RLIMIT_DATA,&dlimit); getrlimit(RLIMIT_STACK,&slimit); dlimit.rlim_cur = dlimit.rlim_max; slimit.rlim_cur = slimit.rlim_max; /* The stack size does not realy need to be changed but I do it anyway */ setrlimit(RLIMIT_DATA,&dlimit); setrlimit(RLIMIT_STACK,&slimit); execvp(argv[1],argv+1); /* Call the program */ } } The calling sequence is as follows: biglimit xdm If you want just the server to have the big limits and not every thing called by xdm then just put biglimit on the call to the X server. Maybe this should be included in the server initialization code? It seems to me that turning on backing store in even a small 24 plane color window would cause havock. In the meantime biglimit.c is excelent for doing customizations with memory limits. Do a "man setrlimit" for more info on this. JonnyG. (jonnyg@umd5.umd.edu) (jonnyg@rover.umd.edu)