PERF_MEM_FREE 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

PERF_MEM_FREE PerfMemFree;

void PerfMemFree(
  IN LPVOID pBuffer,
  IN LPVOID pContext
)
{...}

Parameters

pBuffer

Memory to free.

pContext

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]
Target Platform Windows
Header perflib.h

See also

AllocateMemory

PERF_PROVIDER_CONTEXT