HP-UX 11i September 2002 Release Notes

Programming
Libraries
Chapter 15
267
where the number of arenas is 8, and the expansion size is 32*4096 bytes. In general,
the more arenas you use, the smaller the expansion factor should be, and vice versa.
_M_SBA_OPTS turns on the small block allocator, and sets up parameters for the
small block allocator, namely, maxfast, grain, num_smallblocks. Refer to
mallopt() for details about the small block allocator, and its parameters.
Applications usually run faster with the small block allocator turned on rather than
off.
Although a small block allocator can be turned on through mallopt(), it is not early
enough for C++/Java applications. The environment variable turns it on before the
application starts.
The mallopt() call can still be used the same way. If the environment variable is
set, and no small block allocator has been used, the subsequent mallopt() calls can
still overwrite whatever is set through _M_SBA_OPTS. If the environment variable is
set, and a small block allocator has been used, then mallopt() will have no effect.
For example:
$ export _M_SBA_OPTS=512:100:16
where the maxfast size is 512, the number of small blocks is 100, and the grain size
is 16. You must supply all 3 values, and in that order. If not, the default values will
be used instead.
The _M_ARENA_OPTS and _M_SBA_OPTS environment variables have the following
impact:
Performance is improved for multi-threaded applications.
Threaded applications may experience increased heap storage usage (but you
can adjust the heap usage through _M_ARENA_OPTS).
NOTE Threaded applications that are linked with archive libc (or with other shared
libraries that have dependencies on shared libc) may break.
Overall libc Performance Tuning
new at 11i
original release
To decrease calling overhead, several header files have been changed in the system
library libc, (/usr/lib/libc.sl). In addition, a new archive library has been added to
allow linking the string and memory routines archived but an application as a whole can
be linked shared.
There are now two different 32-bit system libraries. One is built for use on a PA1.1
machine and the other is built for use on a PA2.0 machine. The correct library is
installed at installation time. Other changes to these libraries include a decreased
calling overhead for the shared library. Also, the build process makes use of pragmas
introduced in release 10.20 to decrease the calling overhead in shared libraries.
In addition to the changes to the library builds, changes have been made to selected
header files to allow building applications that have decreased calling overhead. These
changes apply to both 32-bit and 64-bit applications.