mallocng ¤
Commands that help with debugging musl's allocator, mallocng.
Functions:
-
get_slot_color– -
get_colored_slot_state– -
get_colored_slot_state_short– -
dump_group– -
dump_meta–Arguments:
-
dump_grouped_slot– -
dump_slot– -
smart_dump_slot– -
dump_meta_area– -
dump_malloc_context– -
mallocng_slot_user– -
mallocng_slot_start– -
mallocng_meta– -
mallocng_group– -
mallocng_meta_area– -
mallocng_malloc_context– -
mallocng_find– -
bin_ascii– -
colorize_pointer– -
colorize_start_header_line– -
line_decoration–Maybe append extra clarification to a line.
-
mallocng_visualize_slots– -
mallocng_dump– -
mallocng_explain–
Attributes:
-
search_on_fail– -
state_alloc_color– -
state_alloc_color_alt– -
state_freed_color– -
state_freed_color_alt– -
state_avail_color– -
state_avail_color_alt– -
VALID_CHARS– -
vis_cyclic_offset_color– -
vis_offset_color– -
vis_cycled_mark_color– -
vis_pn3_reserved_color– -
vis_big_offset_check_color– -
vis_ftr_reserved_color– -
default_vis_count– -
parser–
search_on_fail module-attribute ¤
search_on_fail = add_param(
"ng-search-on-fail",
True,
"let the ng-slot* commands search the heap if necessary",
help_docstring="\nFor freed, avail(able) and corrupted slots, it may be\nimpossible to recover the start of the group and meta.\n\nWhen this option is set to True, the ng-slotu and ng-slots\ncommands will search the heap to try to find the correct meta/group.\n ",
param_class=PARAM_BOOLEAN,
scope=heap,
)
default_vis_count module-attribute ¤
default_vis_count = add_param(
"ng-vis-count",
10,
"default count for ng-vis",
param_class=PARAM_UINTEGER,
scope=heap,
)
parser module-attribute ¤
parser = ArgumentParser(
description="\nDump the mallocng heap.\n\nMay produce lots of output.\n "
)
dump_meta ¤
dump_meta(meta: Meta, focus_slot: int | None = None) -> str
Parameters:
-
meta(Meta) –the meta to dump
-
focus_slot(int | None, default:None) –the index of the slot to highlight in the slot statuses list
dump_slot ¤
dump_slot(
slot: Slot, all: bool, successful_preload: bool, will_dump_gslot: bool
) -> str
mallocng_find ¤
mallocng_find(
address: int,
all: bool = False,
metadata: bool = False,
shallow: bool = False,
) -> None
colorize_pointer ¤
colorize_start_header_line ¤
line_decoration ¤
Maybe append extra clarification to a line.
Currently only appends to p headers.