Skip to content

Commit

Permalink
Merge pull request x64dbg#3188 from ZehMatt/query-page
Browse files Browse the repository at this point in the history
Start enumerating memory pages at minimum application address
  • Loading branch information
mrexodia authored Aug 25, 2023
2 parents 4e5c2bd + 8c6f308 commit 4a767ea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/dbg/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@ std::map<Range, MEMPAGE, RangeCompare> memoryPages;
bool bListAllPages = 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()
{
// First gather all possible pages in the memory range
std::vector<MEMPAGE> pages;
pages.reserve(200); //TODO: provide a better estimate

SIZE_T numBytes = 0;
duint pageStart = 0;
duint pageStart = (duint)systemInfo.lpMinimumApplicationAddress;
duint allocationBase = 0;

do
Expand Down

0 comments on commit 4a767ea

Please sign in to comment.