2018-11-22 12:47:29 +10:30
|
|
|
#ifndef LIGHTNING_LIGHTNINGD_MEMDUMP_H
|
|
|
|
#define LIGHTNING_LIGHTNINGD_MEMDUMP_H
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
struct command;
|
|
|
|
struct subd;
|
2022-03-08 10:44:41 +10:30
|
|
|
struct subd_req;
|
2018-11-22 12:47:29 +10:30
|
|
|
|
2022-03-08 10:44:41 +10:30
|
|
|
struct leak_detect {
|
|
|
|
struct command *cmd;
|
|
|
|
size_t num_outstanding_requests;
|
|
|
|
const char **leakers;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Start a leak request: decrements num_outstanding_requests when freed. */
|
|
|
|
void start_leak_request(const struct subd_req *req,
|
|
|
|
struct leak_detect *leak_detect);
|
|
|
|
|
|
|
|
/* Yep, found a leak in this subd. */
|
|
|
|
void report_subd_memleak(struct leak_detect *leak_detect, struct subd *leaker);
|
2019-02-04 21:25:42 +10:30
|
|
|
|
2018-11-22 12:47:29 +10:30
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_MEMDUMP_H */
|