


Interface Libraries                             libmtmalloc(3LIB)



NAME
     libmtmalloc - multi-threaded memory allocator library

SYNOPSIS
     cc [ flag... ] file... -lmtmalloc [ library... ]
     #include <mtmalloc.h>


DESCRIPTION
     Functions in this library provide concurrent access to  heap
     space.

INTERFACES
     The  shared  object  libmtmalloc.so.1  provides  the  public
     interfaces defined below. See Intro(3) for additional infor-
     mation on shared object interfaces.



     free                          malloc
     mallocctl                     memalign
     realloc                       valloc

ENVIRONMENT VARIABLES
     MTMALLOC_OPTIONS  A comma separated list of options. The supported 
		       options are:

     		       MTEXCLUSIVE=Y
                       By default, libmtmalloc allocates 2*NCPUS
                       buckets from which allocations occur. 
                       threads share buckets based on their thread 
                       id. If MTEXCLUSIVE is invoked, then 4*NCPUS
                       buckets are used. Threads with thread id less 
                       than 2*NCPUS receive an exclusive bucket and
                       thus do not need to use locks. Allocation
                       performance for these buckets may be dramatically
                       increased. One enabled MTEXCLUSIVE can not be
                       disabled. This feature can be enabled by
                       setting the MTMALLOC_OPTION MTEXCLUSIVE to
                       "Y" or "y" or anything beginning with y. 
		       Alternatively it can be enabled by 
                       a call to mallocctl(see mallocctl).

                       MTMAXCACHE=16,17,18,19,20 or 21
                       By default, allocations less than  2^^16 bytes 
		       are allocated from buckets indexed by thread id.
                       Using this MTMALLOC_OPTION setting, variable size 
		       of the cached allocations can be increased to 
                       2^^17, 2^^18, 2^^18, 2^^19, 2^^20, or 2^^21 by 
                       setting MTMAXCACHE to 17,18,19,20,or 21.
                       If MTMAXCACHE is set to less than 16 it is
                       reset to 16. If MTMAXCACHE is set to more than
                       21, then it is reset to 21. This all occurs
                       silently.

		       MTCHUNKSIZE=xx
                       Allocation buckets are sized by the chunksize
                       and the size of the allocation request. The
                       default setting is 9. At the cost of address
                       space, performance can sometimes enhanced by
                       increasing this parameter.(see mallocctl)
FILES
     /usr/lib/libmtmalloc.so.1

         shared object


     /usr/lib/64/libmtmalloc.so.1

         64-bit shared object


ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

















SunOS 5.11          Last change: 22 May 2003                    1






Interface Libraries                             libmtmalloc(3LIB)



     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWcsl (32-bit)            |
    |_____________________________|_____________________________|
    |                             | SUNWcslx (64-bit)           |
    |_____________________________|_____________________________|
    | MT-Level                    | Safe                        |
    |_____________________________|_____________________________|


SEE ALSO
     pvs(1),  sbrk(2),  Intro(3),  malloc(3C),   malloc(3MALLOC),
     mapmalloc(3MALLOC), mtmalloc(3MALLOC), attributes(5)









































SunOS 5.11          Last change: 22 May 2003                    2



