MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / virtual_alloc

Method virtual_alloc

windows/winobject/process.py:661–667  ·  view source on GitHub ↗

Allocate memory in the process :return: The address of the allocated memory :rtype: :class:`int`

(self, size, prot=PAGE_EXECUTE_READWRITE)

Source from the content-addressed store, hash-verified

659 return int(bits[:2])
660
661 def virtual_alloc(self, size, prot=PAGE_EXECUTE_READWRITE):
662 """Allocate memory in the process
663
664 :return: The address of the allocated memory
665 :rtype: :class:`int`
666 """
667 return winproxy.VirtualAlloc(dwSize=size, flProtect=prot)
668
669 def virtual_free(self, addr):
670 """Free memory in the process by virtual_alloc"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected