Physical Ranges addresses and sizes

Hi,

I’m trying to implement a functionality in a kmdf driver which lists the available physical ranges (their start addresses and sizes). RamMap from Sysinternals displays such information, I’m trying to get the same information in a kmdf driver.

Is there any API that would be helpful in such a case? GlobalMemoryStatusEx() gives the total Physical memory size which is not helpful in this case.

Thanks for your help!

xxxxx@gmail.com wrote:

I’m trying to implement a functionality in a kmdf driver which lists the available physical ranges (their start addresses and sizes). RamMap from Sysinternals displays such information, I’m trying to get the same information in a kmdf driver.

Well, hang on a moment. RamMap shows you the AMOUNT of memory in each
bucket, and it does so through heavy use of undocumented and
underdocumented interfaces. Physical memory tends to get radically
fragmented very, very quickly. RamMap doesn’t tell you anything about
locations.

What are you going to do with this information? Other than idle
curiousity, which RamMap itself satisfies, there is no good reason to
know this kind of thing in the kernel.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for your reply Tim!

I won’t waste this forum’s time and my time for idle curiosity.
This information may be useful when using MmAllocateContiguousMemorySpecifyCache() for example at DriverEntry before physical memory gets fragmented radically…

RamMap doesn’t tell you anything about locations.
RamMap does show the start and end of the available physical ranges.

If the API’s are undocumented/underdocumented then that’s fine.

Thanks again.

MmGetPhysicalMemoryRanges

wrote in message news:xxxxx@ntdev…
> Thanks for your reply Tim!
>
> I won’t waste this forum’s time and my time for idle curiosity.
> This information may be useful when using MmAllocateContiguousMemorySpecifyCache() for example at DriverEntry before physical memory gets fragmented radically…
>
>> RamMap doesn’t tell you anything about locations.
> RamMap does show the start and end of the available physical ranges.
>
> If the API’s are undocumented/underdocumented then that’s fine.
>
> Thanks again.
>

Thank you Maxim!