Skip to content

Commit

Permalink
Change the way allocations are handled
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexodia committed Oct 9, 2022
1 parent 8918799 commit 6ac3e0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dumpulator/dumpulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ def _setup_emulator(self, thread):
info = region[0]
emu_addr = info.BaseAddress & self.addr_mask
if info.State == minidump.MemoryState.MEM_FREE:
if emu_addr > 0x10000 and info.RegionSize >= self._allocate_size:
self._allocate_base = emu_addr
continue
reserve_protect = MemoryProtect(info.AllocationProtect)
reserve_type = MemoryType(info.Type.value)
Expand Down Expand Up @@ -438,6 +436,7 @@ def call(self, addr, args: List[int] = [], regs: dict = {}, count=0):

def allocate(self, size, page_align=False):
if not self._allocate_ptr:
self._allocate_base = self.memory.find_free(self._allocate_size)
self.memory.reserve(self._allocate_base, self._allocate_size, MemoryProtect.PAGE_EXECUTE_READWRITE)
self._allocate_ptr = self._allocate_base

Expand Down

0 comments on commit 6ac3e0c

Please sign in to comment.