Re: memory fault
"david.aubril" <[email protected]>
| Newsgroups | gmane.os.netbsd.help |
|---|---|
| Message-ID | <[email protected]> |
Well, it works. Thanks a lot. Perry E. Metzger wrote: > "david.aubril" <[email protected]> writes: > >> Perry E. Metzger wrote: >> >>> "david.aubril" <[email protected]> writes: >>> >>> >>>> Hi everyone. >>>> I'm using netbsd 3.1 on a i686 laptop. On a couple of applications, I >>>> often meet memory faults. I have to raise memory each time by using >>>> ulimit -d. >>>> I was wondering how I could tune memory size once for all. >>>> >>>> >>> Change your ulimits in your login script (.profile or .login depending >>> on your shell). >>> >> Well, that's the solution if I use a shell to launch the >> application. But what about if I use a launcher or a shortcut in the >> menu ( in a graphical environment ) ? >> > > That depends on how you start X. If you start it from your login shell > with "startx", then .profile works fine, because X is a descendant of > the shell where the ulimit got changed, or your .xinitrc. > > If you start X with xdm, your .xsession file might be appropriate. I > do this in my .xsession to run my profile and my xinitrc, and you > could put the command into either of those: > > ------ > #!/bin/sh > > export XSESSION=YES > > . .profile > . .xinitrc > ------ > > or you could put the ulimit command directly in the .xsession. > > You could also do it in your window manager init file, depending on > the window manager and how it works. > > If you use xdm, another possibility is to do it in an additional > script for the xdm launcher, such as adding a /etc/rc.conf.d/xdm > script containing the right ulimit command. > > There are probably a dozen ways to do this but they're all varations > on the same theme. > >