// wdm.h
MM_SYSTEMSIZE MmQuerySystemSize();
View the official Windows Driver Kit DDI referenceNo description available.
The MmQuerySystemSize routine 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.