INtime SDK Help
GetRtVirtualMemoryInfo
INtime SDK v7.1 > About INtime > INtime Kernel > Memory management > GetRtVirtualMemoryInfo

Returns information about the virtual memory managed by a process.

BOOLEAN GetRtVirtualMemoryInfo(
    RTHANDLE hProcOrVseg , 
    LPVIRTUAL_MEMORY_INFO pMemoryInfo
);

typedef struct tagVirtMemInfo {
    RTHANDLE  hProcess;           // handle for process which owns the vseg
    RTHANDLE  hVseg;              // vseg being inspected
    DWORD     cbVsegSize;         // vseg size, in bytes. 0 == 4 GiB
    DWORD     cbAllocated;        // space allocated from vseg, in bytes
    DWORD     cbAvailable;        // space available, in bytes
    DWORD     cbLargestAvailable; // largest available piece, in bytes
} VIRTUAL_MEMORY_INFO, *LPVIRTUAL_MEMORY_INFO;

Parameters

hProcOrVseg
A handle for a process or a VSEG. If a process handle is given then the call returns information for that' process VSEG.
pMemoryInfo
A pointer to a VIRTUAL_MEMORY_INFO structure where the information is to be returned.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_TYPE 0x8002
The handle is not a handle for a process.
E_EXIST
The handle is not a valid handle for an INtime object.
E_BAD_ADDR
the pMemoryInfo pointer is not a valid address for writable memory.

Requirements

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