## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### VDHFreePages - Purpose

Context Issues: This function can be called in the initialization or task context. At initialization time, only global memory can be freed.

DOS Session Terminations: Any allocations made in the terminating DOS session's private area, or on behalf of the terminating DOS session, must be released by using VDHFreePages.

Notes: This function succeeds only if the linear range specified was allocated by a previous call to VDHAllocPages or VDHReallocPages. Freeing a memory region that was not allocated causes an internal error (a probable system halt).

If the region, starting at ObjectAddress, has been broken into two or more regions by calls to VDHMapPages, then VDHFreePages is not used.