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

Function add_map

ccan/ccan/ptr_valid/ptr_valid.c:59–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static struct ptr_valid_map *add_map(struct ptr_valid_map *map,
60 unsigned int *num,
61 unsigned int *max,
62 unsigned long start, unsigned long end, bool is_write)
63{
64 if (*num == *max) {
65 *max *= 2;
66 map = realloc(map, sizeof(*map) * *max);
67 if (!map)
68 return NULL;
69 }
70 map[*num].start = (void *)start;
71 map[*num].end = (void *)end;
72 map[*num].is_write = is_write;
73 (*num)++;
74 return map;
75}
76
77static struct ptr_valid_map *get_proc_maps(unsigned int *num)
78{

Callers 1

get_proc_mapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected