ulong query_memory(void* address,
                   memory_information* buffer,
                   ulong length)

This function obtains information about a range of pages in the virtual address space of the calling process.


void* address

A pointer to the address starting the range of pages for which information is required. This value is rounded down the ensure it is on a page boundary.

memory_information* buffer

A pointer to a buffer to hold the information about the memory.

ulong length

The size (in bytes) of the memory pointed to by the previous parameter.



The number of bytes placed in the buffer.


The information returned is for a range of pages that share the following properties.

  1. The pages have the same values for the flags:

  2. If the initial page is not free, the pages form part of the same virtual memory allocation.

  3. The pages share the same access flags.