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

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

LPVOID MapRtPhysicalMemoryList(
    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

MapRtPhysicalMemoryList maps physical memory from the address list structure 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 FreeRtMemory 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 MapRtPhysicalMemoryList().
Success
NULL
Function failed (check GetLastRtError).

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/rt/include/rtbase.h rt.h rt.lib
See Also