how to allocate more memory to a process in linux

后端 未结 1 987
被撕碎了的回忆
被撕碎了的回忆 2021-01-19 21:51

I am using a CAD program on 64 bit Fedora 16. At one point the program suddenly crashes and completely exits. My initial guess is that there is not enough memory available f

相关标签:
1条回答
  • 2021-01-19 22:18

    That's not how memory management works on Unix/Linux. You don't allocate memory to processes, they just request more virtual memory as they need it.

    Maybe what you're talking about is the process's virtual memory limit. You can use the shell's ulimit command to set various process limits; use the -d option to set the maximum size of the process's data segment (i.e. the heap), and -s for the stack. However, non-root users can only reduce their limits, they can't increase them. This option applies to that shell process and any programs run from it; I'm not sure how you'd do this for applications from the GUI window manager (maybe put the command in your .xinitrc).

    The system administrator can configure per-user and per-group default limits in /etc/security/limits.conf.

    0 讨论(0)
提交回复
热议问题