Expand Minimize

FreeMemory callback function

Providers implement this function to provide custom memory management for PERFLIB. PERFLIB calls this callback when it needs to free memory that it allocated using AllocateMemory.

The PERF_MEM_FREE type defines a pointer to this callback function. The FreeMemory function is a placeholder for the application-defined function name.

Syntax


void CALLBACK FreeMemory(
  _In_  LPVOID pBuffer,
  _In_  LPVOID pContext
);

Parameters

pBuffer [in]

Memory to free.

pContext [in]

Context information set in the pMemContext member of PERF_PROVIDER_CONTEXT.

Return value

This callback function does not return a value.

Remarks

If you used the -MemoryRoutines when calling CTRPP, you must implement this callback function. You pass the name of your callback function to CounterInitialize.

Windows Vista:  The CounterInitialize function is named PerfAutoInitialize.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Perflib.h

See also

AllocateMemory
PERF_PROVIDER_CONTEXT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft