 |
» |
|
|
 |
|  |  |
When you link a program, the compiler brings all modules that
were compiled at optimization level 4 into virtual memory at the
same time. Depending on the size and number of the modules, compiling
at +O4 can consume
a large amount of virtual memory. If you are linking a large program
that was compiled with the +O4
option, you may notice a system slow down. In the worst case, you
can get an error indicating that you have run out of memory. There
are several things you can do. Compile at level +O4
only those modules that need to be compiled at optimization level
4 and compile the remaining modules at a lower level. If you are still running out of memory, increase
the per-process data size limit. Run the System Administration Manager
(sam) to increase
the maxdsiz process
parameter from 64 MB to 128 MB. This procedure will provide the
process with the additional data space. Refer to HP-UX System Administration Tasks,
Chapter 1, "Reconfiguring the Kernel". The sam
help system fully describes the different process parameters, including
maxdsiz. If increasing the per-process data size limit does
not solve the problem, increase the system swap space. Refer to
HP-UX System Administration Tasks, Chapter
6, "Managing Swap Space and Dump Areas". Adding file system swap
is easier than increasing the amount of device swap, which requires
re-configuring your disk. However, if you find that you are consistently
compiling beyond the available amount of device swap, you may not
have a choice.
|