VirtualFree

VirtualFree frees memory allocated with VirtualAlloc.

Syntax

Copy
BOOL WINAPI VirtualFree(
    LPVOID lpAddress,
    SIZE_T dwSize,
    DWORD dwFreeType
);

Parameters

lpAddress

A pointer previously returned by VirtualAlloc. This pointer cannot point to arbitrary memory. It must be the value returned from a previous call to VirtualAlloc.

dwSize

This must be zero.

dwFreeType

This must be MEM_RELEASE.

Return Value

If the function succeeds, it returns a non-zero value. If the function fails, it returns 0 (zero).

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

windows.h rtkrnl.lib

See Also: