HPlogo HP C/HP-UX Version A.10.32.30 Release Notes: For HP-UX 10.20 Systems > Chapter 4 Problem Descriptions and Fixes

HP C Problems and Limitations

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

Note since HP-UX 10.10 is the last supported operating system for PA-RISC 1.0 architecture systems, the 10.20 compilers no longer support the compiling of code for PA-RISC 1.0.

Required Patch

After installing the HP C/ANSI C Developer's Bundle, install the latest linker patch (PHSS_17903) or its successor. This patch is required by the +objdebug option. Without this patch, the option is ignored.

Nonterminating Parallel Processes

A program compiled with +Oparallel for parallel execution uses shared memory segments and additional processes when it executes. Except in rare circumstances, the program will terminate the processes and free the shared memory whether it completes normally or terminates because of a signal.

However, if enough parallel programs do not terminate their additional processes over a period of time, you may get messages indicating that the operating system refuses to start another process when you attempt to run any program. fork() returns the error value [EAGAIN] (resource temporarily unavailable), which in this case means that the system's limits on the number of system-wide or individual-user processes would be exceeded.

If this should happen, you can use the ps -f command to search for the processes that didn't terminate and the kill command to terminate them (see ps(1) and kill(1)). Note that the ps -f command displays the same name for the processes as it does for their associated main programs.

Likewise, if enough parallel programs happen not to free their shared memory segments over a period of time, programs may start failing because of insufficient memory, either shared or normal. Terminating the additional processes will almost certainly free the shared memory segments as well. If not, you can use the ipcs -m command to search for shared memory segments and the ipcrm command to remove them (see ipcs(1) and ipcrm(1)). Note that the ipcs -m command lists the same owner and group for the shared memory as the associated parallel program had and that most systems normally have active shared memory segments owned by root and daemon.

Memory Allocation Routine alloca()

The implementation of this alloca() routine can be very system dependent and its use is not encouraged.

alloca() is a memory allocation routine similar to malloc() (see malloc(3C)). The syntax is:

void *alloca(size_t size);

alloca() allocates space from the stack of the caller for a block of at least size bytes, but does not initialize the space. The space is automatically freed when the calling routine exits. This routine is implemented as an inlined function by the HP C compiler product.

To use this function, you may use the <alloca.h> header file or you may specify your own prototype and use the +Olibcalls option.

© 1999 - Hewlett-Packard Development Company, L.P.