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

Function htable_set_allocator

ccan/ccan/htable/htable.c:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28static void (*htable_free)(struct htable *, void *) = htable_default_free;
29
30void htable_set_allocator(void *(*alloc)(struct htable *, size_t len),
31 void (*free)(struct htable *, void *p))
32{
33 if (!alloc)
34 alloc = htable_default_alloc;
35 if (!free)
36 free = htable_default_free;
37 htable_alloc = alloc;
38 htable_free = free;
39}
40
41/* We clear out the bits which are always the same, and put metadata there. */
42static inline uintptr_t get_extra_ptr_bits(const struct htable *ht,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68