memory managment extensions - Linux

This is a discussion on memory managment extensions - Linux ; AIX offers two memory management extensions: The Default Memory Allocator with the Malloc Buckets Extension -- From section 4.2.3 of Developing and Porting and C++ Applications on AIX at http://www.redbooks.ibm.com/redbooks/pdfs/sg245674.pdf: ----- The default memory allocator with the malloc buckets extension, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: memory managment extensions

  1. memory managment extensions

    AIX offers two memory management extensions:

    The Default Memory Allocator with the Malloc Buckets Extension -- From
    section 4.2.3 of Developing and Porting and C++ Applications on AIX at
    http://www.redbooks.ibm.com/redbooks/pdfs/sg245674.pdf:
    -----
    The default memory allocator with the malloc buckets extension, or
    simply malloc buckets, provides an optional buckets-based extension of
    the default allocator. It is intended to improve malloc subsystem
    performance for applications that issue large numbers of small
    allocation requests. When malloc buckets is enabled, allocation
    requests that fall within a predefined range of block sizes are
    processed by malloc buckets. All other requests are processed in the
    usual manner by the default allocator.
    -----

    Malloc Multiheap -- From section 4.2.6 of Developing and Porting and
    C++ Applications on AIX at
    http://www.redbooks.ibm.com/redbooks/pdfs/sg245674.pdf:
    -----
    Historically, the malloc subsystem was designed for the non-threaded
    programming environment. Therefore, there was an single memory pool, or
    memory heap, per-process basis. After the evolution of the
    multi-threaded programming environment, it was realized that the single
    heap does not satisfy the memory allocation requests from
    multi-threaded applications, because a single malloc() call from a user
    thread can lock the entire malloc subsystem and the other user threads
    would be starving; thus, malloc() calls within a process would be
    serialized.

    By providing multiple heaps, malloc multiheap efficiently supports the
    memory allocation requests from multi-threaded applications; thus, the
    malloc multiheap has a finer locking mechanism than the single heap
    malloc subsystem. The potential performance enhancement is particularly
    likely for multi-threaded C++ programs, because these may make use of
    the malloc subsystem whenever a constructor or destructor is called.
    -----

    Does Linux offer any similar extensions? If so, where can I find
    document for them?

    Thanks,
    Geoff Alexander


  2. Re: memory managment extensions

    galexander2@nc.rr.com writes:

    > AIX offers two memory management extensions:
    >
    > The Default Memory Allocator with the Malloc Buckets Extension -- From


    I am sure you can find many such extensions as libraries
    for Linux also; if C++ is an option then I would suggest

    http://gcc.gnu.org/onlinedocs/libstd...allocator.html

    and specifically __pool_alloc.

    > Malloc Multiheap -- From section 4.2.6 of Developing and Porting and

    ...
    > By providing multiple heaps, malloc multiheap efficiently supports the
    > memory allocation requests from multi-threaded applications; thus, the
    > malloc multiheap has a finer locking mechanism than the single heap
    > malloc subsystem.


    A technique like has been the default in the GNU/Linux C library since
    1996, so chances are you are already using it:

    http://malloc.de/en/

    Regards,
    Wolfram.

+ Reply to Thread