Skip to content

slab ¤

Classes:

Functions:

Attributes:

OO_SHIFT module-attribute ¤

OO_SHIFT = 16

OO_MASK module-attribute ¤

OO_MASK = 1 << OO_SHIFT - 1

Freelist ¤

Freelist(start_addr: int, offset: int, random: int = 0)

Methods:

Attributes:

start_addr instance-attribute ¤

start_addr = start_addr

offset instance-attribute ¤

offset = offset

random instance-attribute ¤

random = random

__iter__ ¤

__iter__() -> Generator[int, None, None]

__int__ ¤

__int__() -> int

__len__ ¤

__len__() -> int

find_next ¤

find_next(addr: int) -> int

SlabCache ¤

SlabCache(slab_cache: Value)

Attributes:

address property ¤

address: int

name property ¤

name: str

offset property ¤

offset: int

random property ¤

random: int

size property ¤

size: int

object_size property ¤

object_size: int

align property ¤

align: int

flags property ¤

flags: list[str]

cpu_cache property ¤

cpu_cache: CpuCache

returns cpu cache associated to current thread

cpu_caches property ¤

cpu_caches: Generator[CpuCache, None, None]

returns cpu caches for all cpus

node_caches property ¤

node_caches: Generator[NodeCache, None, None]

returns node caches for all NUMA nodes

cpu_partial property ¤

cpu_partial: int

inuse property ¤

inuse: int

__oo_x property ¤

__oo_x: int

oo_order property ¤

oo_order

oo_objects property ¤

oo_objects

CpuCache ¤

CpuCache(cpu_cache: Value, slab_cache: SlabCache, cpu: int)

Attributes:

slab_cache instance-attribute ¤

slab_cache = slab_cache

cpu instance-attribute ¤

cpu = cpu

address property ¤

address: int

freelist property ¤

freelist: Freelist

active_slab property ¤

active_slab: Slab | None

partial_slabs property ¤

partial_slabs: list[Slab]

NodeCache ¤

NodeCache(node_cache: Value, slab_cache: SlabCache, node: int)

Attributes:

slab_cache instance-attribute ¤

slab_cache = slab_cache

node instance-attribute ¤

node = node

address property ¤

address: int

partial_slabs property ¤

partial_slabs: list[Slab]

Slab ¤

Slab(
    slab: Value,
    cpu_cache: CpuCache | None,
    slab_cache: SlabCache,
    is_partial: bool = False,
)

Attributes:

cpu_cache instance-attribute ¤

cpu_cache = cpu_cache

slab_cache instance-attribute ¤

slab_cache = slab_cache

is_partial instance-attribute ¤

is_partial = is_partial

slab_address property ¤

slab_address: int

virt_address property ¤

virt_address: int

object_count property ¤

object_count: int

objects property ¤

objects: Generator[int, None, None]

frozen property ¤

frozen: int

inuse property ¤

inuse: int

slabs property ¤

slabs: int

pobjects property ¤

pobjects: int

freelist property ¤

freelist: Freelist

freelists property ¤

freelists: list[Freelist]

free_objects property ¤

free_objects: set[int]

caches ¤

caches() -> Generator[SlabCache, None, None]

get_cache ¤

get_cache(target_name: str) -> SlabCache | None

slab_struct_type ¤

slab_struct_type() -> str

oo_order ¤

oo_order(x: int) -> int

oo_objects ¤

oo_objects(x: int) -> int

get_flags_list ¤

get_flags_list(flags: int) -> list[str]

find_containing_slab_cache ¤

find_containing_slab_cache(addr: int) -> SlabCache | None

Find the slab cache associated with the provided address.