## Virtual Device Driver Reference for OS/2

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

### Memory-Locking Memory Management Services

VDHLockMem Verify access or lock memory
VDHUnlockMem Release memory lock

Note: The services above allow virtual device drivers to allocate, free, reallocate, and lock memory for global, per-DOS session, page-granular, or byte-granular objects.

Four types of mappings are supported:

Mapping to a physical address
Mapping to another linear address
Mapping to black holes (don't care) pages
Mapping to invalid (unmapped) pages

Virtual device drivers can also request smaller memory allocations from the kernel heap, which is global and fixed. Small, fixed size block services are available to speed up frequent allocations and freeing of memory. For a particular block size, a pool of blocks is maintained and the requirements are met by taking off a block from the block pool.