Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals   Related Pages  

OsclMemAudit Class Reference
[OSCL Memory]

#include <oscl_mem_audit.h>


Public Methods

 OsclMemAudit ()
 ~OsclMemAudit ()
void * MM_allocate (const OsclMemStatsNode *statsNode, uint32 sizeIn, const char *pFileName, uint32 lineNumber, bool allocNodeTracking=false)
bool MM_deallocate (void *pMemBlockIn)
MM_Stats_t * MM_GetStats (const char *const tagIn)
uint32 MM_GetStatsInDepth (const char *tagIn, MM_Stats_CB *array_ptr, uint32 max_nodes)
uint32 MM_GetTreeNodes (const char *tagIn)
bool MM_AddTag (const char *tagIn)
const OsclMemStatsNode * MM_GetTagNode (const char *tagIn)
const OsclMemStatsNode * MM_GetExistingTag (const char *tagIn)
const OsclMemStatsNode * MM_GetRootNode ()
uint32 MM_GetAllocNodeInfo (MM_AllocQueryInfo *output_array, uint32 max_array_size, uint32 offset)
MM_AllocQueryInfo * MM_CreateAllocNodeInfo (uint32 max_array_size)
void MM_ReleaseAllocNodeInfo (MM_AllocQueryInfo *info)
bool MM_Validate (const void *ptrIn)
uint32 MM_GetAllocNo (void)
void MM_GetOverheadStats (MM_AuditOverheadStats &stats)
uint32 MM_GetNumAllocNodes ()
uint32 MM_GetMode (void)
uint8 MM_GetPrefillPattern (void)
uint32 MM_GetPostfillPattern (void)
void MM_SetMode (uint32 inMode)
void MM_SetPrefillPattern (uint8 pattern)
void MM_SetPostfillPattern (uint8 pattern)
void MM_SetTagLevel (uint32 level)
bool MM_SetFailurePoint (const char *tagIn, uint32 alloc_number)
void MM_UnsetFailurePoint (const char *tagIn)
int32 MM_GetRefCount ()
OsclLockBase * GetLock ()

Friends

class OsclMemGlobalAuditObject


Constructor & Destructor Documentation

OsclMemAudit::OsclMemAudit (    )  [inline]
 

Constructor, create the root node in statistics table

OsclMemAudit::~OsclMemAudit (    )  [inline]
 

A destructor, remove all the nodes in allocation andstatistics table


Member Function Documentation

OsclLockBase* OsclMemAudit::GetLock (    )  [inline]
 

API to obtain mem lock ptr

bool OsclMemAudit::MM_AddTag (  const char *    tagIn )  [inline]
 

API to add a node and zero out its counters; Note that this tag should be re-used

Parameters:
tagIn  input tag
Returns:
true if operation succeeds;

void* OsclMemAudit::MM_allocate (  const OsclMemStatsNode *    statsNode,
uint32    sizeIn,
const char *    pFileName,
uint32    lineNumber,
bool    allocNodeTracking = false
)  [inline]
 

The following are APIs t __nothrow_/ const __nothrow_

Returns:
the memory pointer if operation succeeds.

MM_AllocQueryInfo* OsclMemAudit::MM_CreateAllocNodeInfo (  uint32    max_array_size )  [inline]
 

bool OsclMemAudit::MM_deallocate (  void *    pMemBlockIn )  [inline]
 

Returns:
true if operation succeeds;

uint32 OsclMemAudit::MM_GetAllocNo (  void    )  [inline]
 

API to get the current allocation number

Returns:
the current allocation number

uint32 OsclMemAudit::MM_GetAllocNodeInfo (  MM_AllocQueryInfo *    output_array,
uint32    max_array_size,
uint32    offset
)  [inline]
 

API to query the list of alloc nodes. It copies the information into the provided output array.

Parameters:
output_array  the array where the data will be written
max_array_size  the max number of output array elements
offset  the offset into the alloc node list from which the data should begin.
Returns:
the number of valid nodes in the output array

const OsclMemStatsNode* OsclMemAudit::MM_GetExistingTag (  const char *    tagIn )  [inline]
 

API to add a node and zero out its counters; Note that this tag should be re-used

Parameters:
tagIn  input tag
Returns:
true if operation succeeds;

uint32 OsclMemAudit::MM_GetMode (  void    )  [inline]
 

API to get the operating mode of the mm_audit class.

uint32 OsclMemAudit::MM_GetNumAllocNodes (    )  [inline]
 

API to get the number of allocation nodes (records) for allocations that are being tracked individually.

void OsclMemAudit::MM_GetOverheadStats (  MM_AuditOverheadStats &    stats )  [inline]
 

API to get the overhead statistics for the memory used by the mm_audit class.

uint32 OsclMemAudit::MM_GetPostfillPattern (  void    )  [inline]
 

API to get the postfill pattern. The pattern is used to fill the memory before freeing it.

uint8 OsclMemAudit::MM_GetPrefillPattern (  void    )  [inline]
 

API to get the prefill pattern. The pattern is used to fill the memory before returning it to the caller.

int32 OsclMemAudit::MM_GetRefCount (    )  [inline]
 

const OsclMemStatsNode* OsclMemAudit::MM_GetRootNode (    )  [inline]
 

MM_Stats_t* OsclMemAudit::MM_GetStats (  const char *const    tagIn )  [inline]
 

API to get memory statistics through context string(tag)

Returns:
statistics pointer if operation succeeds

uint32 OsclMemAudit::MM_GetStatsInDepth (  const char *    tagIn,
MM_Stats_CB *    array_ptr,
uint32    max_nodes
)  [inline]
 

API to get memory statistics in detail through context string(tag) including its subtree

Returns:
statistics pointer array and actual number of nodes if operation succeeds

const OsclMemStatsNode* OsclMemAudit::MM_GetTagNode (  const char *    tagIn )  [inline]
 

API to add a node and zero out its counters; Note that this tag should be re-used

Parameters:
tagIn  input tag
Returns:
pointer to OsclMemStatsNode which should be passed to MM_allocate

uint32 OsclMemAudit::MM_GetTreeNodes (  const char *    tagIn )  [inline]
 

API to get the number of tree nodes including the tag node and its subtree

Parameters:
tagIn  input tag
Returns:
the number of tree nodes ; 0 means no tag node

void OsclMemAudit::MM_ReleaseAllocNodeInfo (  MM_AllocQueryInfo *    info )  [inline]
 

bool OsclMemAudit::MM_SetFailurePoint (  const char *    tagIn,
uint32    alloc_number
)  [inline]
 

API to insert allocation failure deterministically according to allocation number associated with tag

Parameters:
tagIn  input tag
alloc_number  allocation number associated with tag
Returns:
true if operation succeeds;

void OsclMemAudit::MM_SetMode (  uint32    inMode )  [inline]
 

API to set the operating mode of the mm_audit class.

void OsclMemAudit::MM_SetPostfillPattern (  uint8    pattern )  [inline]
 

API to set the postfill pattern.

void OsclMemAudit::MM_SetPrefillPattern (  uint8    pattern )  [inline]
 

API to set the prefill pattern.

void OsclMemAudit::MM_SetTagLevel (  uint32    level )  [inline]
 

API to set the maximum tag level,i.e. tag level for a.b.c.d = 4

Parameters:
level  input tag level to be set

void OsclMemAudit::MM_UnsetFailurePoint (  const char *    tagIn )  [inline]
 

API to cancel the allocation failure point associated with tag

Parameters:
tagIn  input tag

bool OsclMemAudit::MM_Validate (  const void *    ptrIn )  [inline]
 

API to check the input pointer is a valid pointer to a chunk of memory

Parameters:
ptrIn  input pointer to be validated
Returns:
true if operation succeeds;


Friends And Related Function Documentation

friend class OsclMemGlobalAuditObject [friend]
 


The documentation for this class was generated from the following file:
OSCL API
Posting Version: CORE_8.508.1.1