| 235 | * kept under 1/2. Values are the edge pointers (stable heap records). */ |
| 236 | |
| 237 | static void edge_key_hash(const char *key, uint64_t *h0, uint64_t *h1) { |
| 238 | uint64_t a = 1469598103934665603ULL; |
| 239 | uint64_t b = 0x9E3779B97F4A7C15ULL; |
| 240 | for (const unsigned char *p = (const unsigned char *)key; *p; p++) { |
| 241 | a ^= *p; |
| 242 | a *= 1099511628211ULL; |
| 243 | b = (b ^ *p) * 0xFF51AFD7ED558CCDULL; |
| 244 | b ^= b >> 29; |
| 245 | } |
| 246 | *h0 = a; |
| 247 | *h1 = b ^ (a >> 17); |
| 248 | } |
| 249 | |
| 250 | static void edge_key_map_free(edge_key_map_t *m) { |
| 251 | cbm_free(CBM_MEM_CLASS_GBUF_INDEX, m->slots); |
no outgoing calls
no test coverage detected