HP-UX 11i March 2002 Release Notes

Programming Libraries
Chapter 13
214
threaded applications. In general, the more threads in an application, the more
arenas should be used for better performance. Expansion factors control the number
of pages to expand each time and assumes the page size is 4096 bytes. The number of
arenas can be from 4 to 64 for threaded applications.
For non-threaded applications, only one arena is used regardless of whether this
environment variable is set or not. However, you still can use this environment
variable to change the expansion factor for non-threaded applications.
If the environment variable is not set, or the number of arenas is set to be out of the
range, the default number of 8 is used. The expansion factor is from 1 to 4096; the
default value is 32. Again, if the factor is out of the range, the default value will be
used. For example:
$ export _M_ARENA_OPTS=8:32
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