[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

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

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.

Related Information

malloc, free, realloc, calloc, mallopt, mallinfo, mallinfo_heap, alloca, or valloc Subroutine, and get_malloc_log Subroutine.

reset_malloc_log Subroutine in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 2.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]