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

Function scan_for_pointers

common/memleak.c:115–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static void scan_for_pointers(struct htable *memtable,
116 const tal_t *p, size_t bytelen)
117{
118 size_t i, n;
119
120 /* Search for (aligned) pointers. */
121 n = bytelen / sizeof(void *);
122 for (i = 0; i < n; i++) {
123 void *ptr;
124
125 memcpy(&ptr, (char *)p + i * sizeof(void *), sizeof(ptr));
126 if (memleak_ptr(memtable, ptr))
127 scan_for_pointers(memtable, ptr, tal_bytelen(ptr));
128 }
129}
130
131void memleak_scan_region(struct htable *memtable, const void *ptr, size_t len)
132{

Callers 3

memleak_scan_regionFunction · 0.85
memleak_scan_objFunction · 0.85
memleak_scan_list_headFunction · 0.85

Calls 2

tal_bytelenFunction · 0.85
memleak_ptrFunction · 0.70

Tested by

no test coverage detected