mallinfo()

QNX SDP8.0C Library ReferenceAPIDeveloper

Get memory allocation information

Synopsis:

#include <malloc.h>

struct mallinfo mallinfo ( void );

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The mallinfo() function returns memory-allocation information in the form of a struct mallinfo:

struct mallinfo {
    size_t arena;    /* non-mmapped space allocated from system (bytes)*/
    size_t ordblks;  /* number of free chunks */
    size_t smblks;   /* always zero */
    size_t hblks;    /* number of arenas */
    size_t hblkhd;   /* space allocated in mmapped regions (bytes) */
    size_t usmblks;  /* maximum arena size */
    size_t fsmblks;  /* always zero */
    size_t uordblks; /* total allocated space (bytes) */
    size_t fordblks; /* total free space (bytes) */
    size_t keepcost; /* space at top of heap that could be released by malloc_trim() (bytes) */
};

Returns:

A struct mallinfo.

Classification:

Legacy Unix

Safety:
Cancellation pointNo
Signal handlerNo
ThreadYes
Page updated: