get_malloc_log_live Subroutine

Purpose

Provides information about the malloc subsystem.

Syntax

#include <malloc.h>
struct malloc_log* get_malloc_log_live (addr)
void *addr;

Description

The get_malloc_log_live subroutine provides access to a record of currently active malloc allocations. The information is stored as an array of malloc_log structures, which are located in the process heap. This data is volatile and subject to update. The addr parameter must be either a pointer to space allocated previously by the malloc subsystem or NULL.

Parameters

Item Description
addr Pointer to space allocated previously by the malloc subsystem

Return Values

The get_malloc_log_live subroutine returns a pointer to the process heap at which the records of current malloc allocations are stored. If the addr parameter is NULL, a pointer to the beginning of the array is returned. If addr is a pointer to space allocated previously by the malloc subsystem, the pointer returned corresponds to records of the same heap as addr. If Malloc Log is not enabled, NULL is returned. If addr is not a pointer allocated by the malloc subsystem, NULL is returned and the errno global variable is set to EINVAL.