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

Function scan_for_pointers

common/memleak.c:134–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134static void scan_for_pointers(struct htable *memtable,
135 const tal_t *p, size_t bytelen)
136{
137 size_t i, n;
138
139 /* Search for (aligned) pointers. */
140 n = bytelen / sizeof(void *);
141 for (i = 0; i < n; i++) {
142 void *ptr;
143
144 memcpy(&ptr, (char *)p + i * sizeof(void *), sizeof(ptr));
145 if (memleak_ptr(memtable, ptr))
146 scan_for_pointers(memtable, ptr, tal_bytelen(ptr));
147 }
148}
149
150void memleak_scan_region(struct htable *memtable, const void *ptr, size_t len)
151{

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