MCPcopy Create free account
hub / github.com/ElementsProject/lightning / dev_connect_memleak

Function dev_connect_memleak

connectd/connectd.c:2064–2083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2062}
2063
2064static void dev_connect_memleak(struct daemon *daemon, const u8 *msg)
2065{
2066 struct htable *memtable;
2067 bool found_leak;
2068
2069 /* As a side-effect, this tells us lightningd will be unresponsive,
2070 * so don't complain (and break CI!) if it's slow. */
2071 daemon->dev_lightningd_is_slow = true;
2072
2073 memtable = memleak_start(tmpctx);
2074 memleak_ptr(memtable, msg);
2075
2076 /* Now delete daemon and those which it has pointers to. */
2077 memleak_scan_obj(memtable, daemon);
2078
2079 found_leak = dump_memleak(memtable, memleak_status_broken, NULL);
2080 daemon_conn_send(daemon->master,
2081 take(towire_connectd_dev_memleak_reply(NULL,
2082 found_leak)));
2083}
2084
2085static void dev_suppress_gossip(struct daemon *daemon, const u8 *msg)
2086{

Callers 1

recv_reqFunction · 0.85

Calls 4

daemon_conn_sendFunction · 0.85
memleak_startFunction · 0.50
memleak_ptrFunction · 0.50
memleak_scan_objFunction · 0.50

Tested by

no test coverage detected