_GetNulPageHandle


include vmm.inc

VMMcall _GetNulPageHandle

mov     [NulPage], eax          ; handle of system nul page

Returns the memory handle of the system nul page. This page can be mapped to unused regions of the address space to prevent page faults. The system nul page can be mapped to multiple locations in the system, so its contents are always random. Uses EAX.

The null page handle is the one exception to the otherwise uniform rule that memory handles and memory addresses are the same. The handle returned by _GetNulPageHandle can be used in the following (and only in the following) ways: It can be passed as the source page handle in _MapIntoV86, or as the source physical page for _PageCommitPhys, in order to map or commit null pages. As a special case, you can also pass the null page handle to _PageGetSizeAddr, although the return value is not entirely meaningful.

See also _MapIntoV86, _PageCommitPhys, _PageGetSizeAddr