Merge pull request #3188 from ZehMatt/query-page
Start enumerating memory pages at minimum application address
This commit is contained in:
commit
4a767ea507
|
@ -24,6 +24,14 @@ std::map<Range, MEMPAGE, RangeCompare> memoryPages;
|
||||||
bool bListAllPages = false;
|
bool bListAllPages = false;
|
||||||
bool bQueryWorkingSet = false;
|
bool bQueryWorkingSet = false;
|
||||||
|
|
||||||
|
// Get system information once.
|
||||||
|
static const SYSTEM_INFO systemInfo = []()
|
||||||
|
{
|
||||||
|
SYSTEM_INFO si;
|
||||||
|
GetSystemInfo(&si);
|
||||||
|
return si;
|
||||||
|
}();
|
||||||
|
|
||||||
static std::vector<MEMPAGE> QueryMemPages()
|
static std::vector<MEMPAGE> QueryMemPages()
|
||||||
{
|
{
|
||||||
// First gather all possible pages in the memory range
|
// First gather all possible pages in the memory range
|
||||||
|
@ -31,7 +39,7 @@ static std::vector<MEMPAGE> QueryMemPages()
|
||||||
pages.reserve(200); //TODO: provide a better estimate
|
pages.reserve(200); //TODO: provide a better estimate
|
||||||
|
|
||||||
SIZE_T numBytes = 0;
|
SIZE_T numBytes = 0;
|
||||||
duint pageStart = 0;
|
duint pageStart = (duint)systemInfo.lpMinimumApplicationAddress;
|
||||||
duint allocationBase = 0;
|
duint allocationBase = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue