PERF_MEM_FREE callback function (perflib.h)

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

[in] pBuffer

Memory to free.

[in] pContext

Context information set in the pMemContext member of PERF_PROVIDER_CONTEXT.

Return value

None

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

Requirement Value
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