HP-UX 11i December 2001 Release Notes
Programming
Libraries
Chapter 13
215
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 with a small
block allocator turned on usually run faster than with it turned off.
A small block allocator can be turned on through mallopt(); however, it is not early
enough for C++/Java applications. The environment variable turns it on before the
application starts.
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 ones 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 which are linked with archive libc and other shared libraries
where those shared libraries have dependencies on shared libc may break.
libc Performance Improvements (new at 11i original release)
Overall libc Performance Tuning
This information refers to the system library libc, /usr/lib/libc.sl. Several header
files have been changed as described below. A new archive library has been added to
allow linking the string and memory routines archived but the 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
Two new libraries are added, /usr/lib/libcres.a and
/usr/lib/pa20_64/libcres.a. These archive libraries include the common string and