MM_SYSTEM_SIZE
MmQuerySystemSize(
);
MmQuerySystemSize returns an estimate of the amount of memory in the system.
MmQuerySystemSize returns one of MmSmallSystem, MmMediumSystem, or MmLargeSystem.
This routine can be called during driver initialization to determine how much memory it is practical to allocate for an internal buffer, such as a zone segment.
Callers of MmQuerySystemSize must be running at IRQL PASSIVE_LEVEL.