INtime SDK Help
ntxmapRtPhysicalMemoryList
INtime SDK v7 > About INtime > INtime Kernel > Memory management > ntxmapRtPhysicalMemoryList

Map a list of physical memory pages into the NTX application's address space.

LPVOID ntxMapRtPhysicalMemoryList(
    LPCHDESC pAddrList,
    DWORD cbSize,
    DWORD dwFlags
);

Parameters

pAddrList
Pointer to address list structure.
cbSize
The size in bytes of the total area to be mapped for the entire memory list.
dwFlags
Specifies the properties of the mapped memory. By default, the properties of the mapped view of the memory are read/write, cache enabled, write-back caching policy. This parameter allows modifying some of the default properties. Possible flags include:
PTE_WRITE_THRU Enables write-through caching policy for the mapped memory.
PTE_CACHE_DISABLE Disables caching for the mapped memory.
PTE_PAT Allows setting the PAT bit to index the desired PAT entry to select caching policy for the mapped memory.

Remarks

ntxMapRtPhysicalMemoryList maps physical memory from the address list structure for cbSize bytes into the virtual address space of the calling thread's process without inserting empty guard pages.

If the values of cbSize are not 4Kbyte-aligned, then the kernel will make adjustments so that the mapping is aligned. Thus the virtual memory consumed will be more than the value of cbSize.

Use ntxUnmapRtPhysicalMemoryList to delete the mapping created by this call and to free the virtual memory associated with it.

Note: the cache type values set in dwFlags field do not change the cache type of the physical memory being mapped, but only the cache type of the mapping. If the physical memory is access through a different mapping then different caching policy may be applied.

Return Values

System resources used by ntxMapRtPhysicalMemoryList().
Success
NULL
Function failed (check ntxGetLastRtError).

Status

E_OK 0x0000
On success.
E_STATE 0x0007
Memory was not previously mapped.

Requirements

Versions Defined in Include Link to
INtime 4.0 intime/nt/include/ntx.h ntx.h ntx.lib
INtime 4.01 (for 64-bit Windows) intime/nt/include/ntx.h ntx.h ntx64.lib
See Also