HP-UX 11i v2 Read Before Installing or Updating, September 2006
Inefficient Memory Use in CIM Server Daemon
In earlier versions of libc on PA-RISC systems, libc
used a single lock in the malloc routines to make them
thread-safe. In a multi-threaded application, there may be
contention on this single lock if multiple threads are
calling malloc and free at the same time.
On HP-UX 11i Version 1.5 (B.11.20), libc provides
multiple arenas, malloc can allocate space from, and a
lock for each arena. Threads are distributed among the
arenas. Two new environment variables are introduced:
_M_ARENA_OPTS and _M_SBA_OPTS.
The _M_ARENA_OPTS environment variable can be used
to tune the number of arenas and the arena expansion
factor for threaded applications.
The syntax for setting this variable is:
export _M_ARENA_OPTS=
x:y
where
x
is the number of arenas and
y
is the expansion
factor. Add this statement in the startup script for a
multi-threaded application to control the number of
arenas and the related expansion factor.