MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / node_print

Function node_print

deps/jemalloc/test/unit/ph.c:42–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40ph_gen(static, heap_, heap_t, node_t, link, node_cmp_magic);
41
42static void
43node_print(const node_t *node, unsigned depth) {
44 unsigned i;
45 node_t *leftmost_child, *sibling;
46
47 for (i = 0; i < depth; i++) {
48 malloc_printf("\t");
49 }
50 malloc_printf("%2"FMTu64"\n", node->key);
51
52 leftmost_child = phn_lchild_get(node_t, link, node);
53 if (leftmost_child == NULL) {
54 return;
55 }
56 node_print(leftmost_child, depth + 1);
57
58 for (sibling = phn_next_get(node_t, link, leftmost_child); sibling !=
59 NULL; sibling = phn_next_get(node_t, link, sibling)) {
60 node_print(sibling, depth + 1);
61 }
62}
63
64static void
65heap_print(const heap_t *heap) {

Callers 1

heap_printFunction · 0.70

Calls 1

malloc_printfFunction · 0.50

Tested by

no test coverage detected