Skip to content

Memory

Reading, writing, and describing memory.

PAGE_MASK = ~PAGE_SIZE - 1 module-attribute

PAGE_SIZE = 4096 module-attribute

align_down = round_down module-attribute

align_up = round_up module-attribute

Page

Represents the address space and page permissions of at least one page of memory.

end: int property

Address beyond mapping. So the last effective address is self.end-1 It is the same as displayed in /proc//maps

execute: bool property

flags = flags class-attribute instance-attribute

is_guard: bool property

is_memory_mapped_file: bool property

is_stack: bool property

memsz = size class-attribute instance-attribute

objfile = objfile class-attribute instance-attribute

offset = offset class-attribute instance-attribute

permstr: str property

read: bool property

rw: bool property

rwx: bool property

start: int property

Mapping start address.

vaddr = start class-attribute instance-attribute

write: bool property

wx: bool property

__contains__(addr)

__eq__(other)

__hash__()

__init__(start, size, flags, offset, objfile='')

__lt__(other)

__repr__()

__str__()

page_align(address)

page_align(address) -> int

Round down address to the nearest page boundary.

page_offset(address)

page_size_align(address)

round_down(address, align)

round_down(address, align) -> int

Round down address to the nearest increment of align.

round_up(address, align)

round_up(address, align) -> int

Round up address to the nearest increment of align.