Skip to content

Heap

VALID_CHARS = list(map(ord, set(printable) - set('\t\r\n\x0c\x0b'))) module-attribute

group = parser.add_mutually_exclusive_group() module-attribute

parser = argparse.ArgumentParser(description='Shows heap related configuration.') module-attribute

try_free_parser = argparse.ArgumentParser(description='Check what would happen if free was called with given address.') module-attribute

arena(addr=None)

Print the contents of an arena, default to the current thread's arena.

arenas()

Lists this process's arenas.

bin_ascii(bs)

bin_labels_mapping(collections)

Returns all potential bin labels for all potential addresses We precompute all of them because doing this on demand was too slow and inefficient See #1675 for more details

bins(addr=None, tcache_addr=None)

Print the contents of all an arena's bins and a thread's tcache, default to the current thread's arena and tcache.

fastbins(addr=None, verbose=False)

Print the contents of an arena's fastbins, default to the current thread's arena.

find_fake_fast(target_address, max_candidate_size=None, align=False, glibc_fastbin_bug=False)

Find candidate fake fast chunks overlapping the specified address.

format_bin(bins, verbose=False, offset=None)

heap(addr=None, verbose=False, simple=False)

Iteratively print chunks on a heap, default to the current thread's active heap.

heap_config(filter_pattern)

hi(addr, verbose=False, simple=False, fake=False)

largebins(addr=None, verbose=False)

Print the contents of an arena's largebins, default to the current thread's arena.

malloc_chunk(addr, fake=False, verbose=False, simple=False, next=0, dump=False)

Print a malloc_chunk struct's contents.

mp()

Print the mp_ struct's contents.

print_no_arena_found_error(tid=None)

print_no_tcache_bins_found_error(tid=None)

read_chunk(addr)

Read a chunk's metadata.

smallbins(addr=None, verbose=False)

Print the contents of an arena's smallbins, default to the current thread's arena.

tcache(addr=None)

Print a thread's tcache contents, default to the current thread's tcache.

tcachebins(addr=None, verbose=False)

Print the contents of a tcache, default to the current thread's tcache.

top_chunk(addr=None)

Print relevant information about an arena's top chunk, default to the current thread's arena.

try_free(addr)

unsortedbin(addr=None, verbose=False)

Print the contents of an arena's unsortedbin, default to the current thread's arena.

vis_heap_chunks(addr=None, count=None, beyond_top=False, no_truncate=False, all_chunks=False)

Visualize chunks on a heap, default to the current arena's active heap.