| 28 | static void (*htable_free)(struct htable *, void *) = htable_default_free; |
| 29 | |
| 30 | void 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. */ |
| 42 | static inline uintptr_t get_extra_ptr_bits(const struct htable *ht, |