Parent document is top of "comp.sys.hp.hpux FAQ"
Previous document is "7.15 How can I track log files and core files?"
Next document is "7.17 How can I make a ramdisk?"

7.16 How much memory can a process use?

The first limiter is probably swap space.  The combined virtual data space
of all running processes can't exceed swap size. Run /etc/swapinfo -t and
look at the total line.  That's all you have left.

For FORTRAN programs:
--------------------
1) Increase the kernel's stack limit (maxssiz).  You can do this with
   sam (Kernel Configuration-> Modify Operating System Parameters->
   Process Parameters).  The practical limit for user stacks is around
   80 Mbytes.  Your system probably has an 8 Mbyte limit.  Try 16 Mbytes
   or 32 Mbytes depending on your expected use.  Give sam a number that
   is a multiple of the 4096-byte pagesize.

2) Change your array allocation.  HP FORTRAN allocates non-common,
   non-SAVE'd arrays on the process stack.  Common blocks and SAVE'd
   variables are allocated in the process data segment (with much larger
   size limits).  If your arrays are declared in the main program and
   passed to subroutines, you can just SAVE the big ones in the main
   program, or put them in a common block in the main program, or
   recompile with -K since -K puts all local variables in the data
   segment.  (-K is a sledgehammer approach, but it gives you a quick
   indication that stack size is the issue.)

3)  Make sure you have enough swap space.
-------------------

(Thanks to Bob Montgomery, HP)

Parent document is top of "comp.sys.hp.hpux FAQ"
Previous document is "7.15 How can I track log files and core files?"
Next document is "7.17 How can I make a ramdisk?"