Operating System - HP-UX
1828668 Members
1895 Online
109984 Solutions
New Discussion

How to increase memory allocation for a user

 
SOLVED
Go to solution
wvsa
Regular Advisor

How to increase memory allocation for a user

Good morning, running a shell script as root and have noticed be looking at top and glance that the script is only using 228K of memory. My question is how can I increase the amount of memory the shell script can use.

Thankyou in advance for your responses, all of you are most helpful
4 REPLIES 4
Paul Sperry
Honored Contributor

Re: How to increase memory allocation for a user

nice - run a command at nondefault priority
Paul Sperry
Honored Contributor

Re: How to increase memory allocation for a user

If the process is allready running then:
renice - alter priority of running processes

SYNOPSIS
renice [-n newoffset] [-g|-p|-u] id ...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to increase memory allocation for a user

I am somewhat puzzled by your question. The answer is that the shell uses as much memory as it needs up to maxima defined by maxssiz, maxdsiz, and maxtsiz. Because the size of the code doesn't change, really only maxdsiz and to a lesser extent maxssiz come into play. These only serve to set the upper limits but you only approach them by using/declaring a shipload of variables. The variables are allocated dynamically and the memory usage could then increase. You can also issue ulimit -s and -d commands to increase the soft limits fore the stack and data segments upto the hard limits (maxssiz and maxdsiz). Again, these only define upper limits but the process will only grow if
memory allocation is actually requested.


If it ain't broke, I can fix that.
Anthony deRito
Respected Contributor

Re: How to increase memory allocation for a user

It's using what it needs to run. The memory its using may be in physical memory or virtual memory depending on how the memory management subsystem decides to allocate it. You don't have any control over this.