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 {
    int arena;    /* non-mmapped space allocated from system (bytes)*/
    int ordblks;  /* number of free chunks */
    int smblks;   /* always zero */
    int hblks;    /* number of arenas */
    int hblkhd;   /* space allocated in mmapped regions (bytes) */
    int usmblks;  /* maximum arena size */
    int fsmblks;  /* always zero */
    int uordblks; /* total allocated space (bytes) */
    int fordblks; /* total free space (bytes) */
    int keepcost; /* space at the top of the heap that could be released by malloc_trim() (bytes) */
};

Returns:

A struct mallinfo.

Classification:

Legacy Unix

Safety:
Cancellation pointNo
Signal handlerNo
ThreadYes
Page updated: