miasm
Reverse engineering framework
miasm.os_dep.common.heap Class Reference
Inheritance diagram for miasm.os_dep.common.heap:
Collaboration diagram for miasm.os_dep.common.heap:

Public Member Functions

def next_addr (self, size)
 
def alloc (self, jitter, size, perm=PAGE_READ|PAGE_WRITE, cmt="")
 
def vm_alloc (self, vm, size, perm=PAGE_READ|PAGE_WRITE, cmt="")
 
def get_size (self, vm, ptr)
 

Public Attributes

 addr
 

Static Public Attributes

int addr = 0x20000000
 
int align = 0x1000
 
int size = 32
 
tuple mask = (1 << size) - 1
 

Member Function Documentation

◆ alloc()

def miasm.os_dep.common.heap.alloc (   self,
  jitter,
  size,
  perm = PAGE_READ | PAGE_WRITE,
  cmt = "" 
)
@jitter: a jitter instance
@size: the size to allocate
@perm: permission flags (see vm_alloc doc)
Here is the call graph for this function:

◆ get_size()

def miasm.os_dep.common.heap.get_size (   self,
  vm,
  ptr 
)
@vm: a VmMngr instance
@size: ptr to get the size of the associated allocation.

`ptr` can be the base address of a previous allocation, or an address
within the allocated range. The size of the whole allocation is always
returned, regardless ptr is the base address or not.
Here is the caller graph for this function:

◆ next_addr()

def miasm.os_dep.common.heap.next_addr (   self,
  size 
)
@size: the size to allocate
return the future checnk address
Here is the caller graph for this function:

◆ vm_alloc()

def miasm.os_dep.common.heap.vm_alloc (   self,
  vm,
  size,
  perm = PAGE_READ | PAGE_WRITE,
  cmt = "" 
)
@vm: a VmMngr instance
@size: the size to allocate
@perm: permission flags (PAGE_READ, PAGE_WRITE, PAGE_EXEC or any `|`
    combination of them); default is PAGE_READ|PAGE_WRITE
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ addr [1/2]

int miasm.os_dep.common.heap.addr = 0x20000000
static

◆ addr [2/2]

miasm.os_dep.common.heap.addr

◆ align

int miasm.os_dep.common.heap.align = 0x1000
static

◆ mask

tuple miasm.os_dep.common.heap.mask = (1 << size) - 1
static

◆ size

int miasm.os_dep.common.heap.size = 32
static

The documentation for this class was generated from the following file: