[This is preliminary documentation and subject to change.]
VLM places severe restrictions on the memory that may be addressed by 64-bit pointers. These restrictions limit the use of the VLM application programming interface (API) to certain narrowly defined situations in which applications require high-speed access to large portions of memory. The restrictions are:
All committed memory must be backed by physical memory that must be available at the time of commitment; paging files are never used to back committed memory. In fact, physical memory at the time of the commitment must exceed the committed memory by at least 16 MB. However, the address space used to map virtual committed memory can be reserved.
Page faults can only occur in VLM addresses when they are being used to map in an actual data file from disk. Page faults occur only on mapped data files, and each page can only generate a fault once, when it is first accessed. After the first access, a page is locked into memory, never to be trimmed by the usual swapping process. Thus, page faults operate only to bring data into physical memory, never to swap the data out.
The Microsoft® 32-bit C/C++ Optimizing Compiler that presently supports VLM is distributed with Visual C++ 5.0 and later. Compilers for VLM-capable processors require some modifications to expose 64-bit addressing. These modifications include the new __ptr64 pointer modifier used in type definitions. The use of this modifier follows this syntax:
name-of-type * __ptr64 name-of-variable
where name-of-type is the name of the type used and name-of-variable is the name of the variable to be defined.
Compilers for VLM-capable processors must also support all the conversions to and from 32- and 64-bit pointers. Conversion support in this case means that 64-bit–to–32-bit conversions are truncated and 32-bit–to–64-bit conversions are sign-extended.
Although VLM is supported on computers with as little as 128 MB of physical memory, VLM becomes more useful as physical memory exceeds 2 GB. However, for the sake of portability, VLM can be used on computers with as little physical memory as 128 MB.