INtime SDK Help
MapRtPhysicalMemory
INtime SDK v6 > About INtime > INtime Kernel > Memory management > MapRtPhysicalMemory

Maps a physical memory area, defined by its absolute physical address and contiguous length before any translation imposed by the paging system, into the current process' virtual address space.

PVOID MapRtPhysicalMemory(
    DWORD dwAbsoluteAddress,    // absolute physical address of memory to be mapped
    DWORD cbSize                // size of area to be mapped
);

Parameters

dwAbsoluteAddress
The absolute, 32-bit, physical address of the area to be mapped.
cbSize
The size in bytes of the area to be mapped.

Remarks

MapRtPhysicalMemory maps physical memory starting at dwAbsoluteAddress for size bytes into the virtual address space of this calling thread's process.

If the values of dwAbsoluteAddress and 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.

This call is limited to mapping memory from below 4 GiB. Use MapRtPhysicalMemory64 to map physical memory from any physical address.

Return Values

The address of the area mapped.
Success.
NULL
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_MEM 0x0002
Creating page table(s) for this request requires more available physical memory than currently exists.
E_VMEM 0x00F0
Satisfying this request requires more virtual memory than is available to the process.
E_PARAM 0x8004
cbSize is zero.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also