HP-UX 11i Version 1.5 Release Notes, September 2001

Programming
Changes to libc
Chapter 7 99
time of the mallopt() calls.)
_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.
New malloc family API
The new API, memalign(), has been added to the malloc family. See the
memalign (3C) manual page for details.