MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / hash

Function hash

deps/jemalloc/include/jemalloc/internal/hash.h:303–317  ·  view source on GitHub ↗

/ API. */

Source from the content-addressed store, hash-verified

301/******************************************************************************/
302/* API. */
303static inline void
304hash(const void *key, size_t len, const uint32_t seed, size_t r_hash[2]) {
305 assert(len <= INT_MAX); /* Unfortunate implementation limitation. */
306
307#if (LG_SIZEOF_PTR == 3 && !defined(JEMALLOC_BIG_ENDIAN))
308 hash_x64_128(key, (int)len, seed, (uint64_t *)r_hash);
309#else
310 {
311 uint64_t hashes[2];
312 hash_x86_128(key, (int)len, seed, hashes);
313 r_hash[0] = (size_t)hashes[0];
314 r_hash[1] = (size_t)hashes[1];
315 }
316#endif
317}
318
319#endif /* JEMALLOC_INTERNAL_HASH_H */

Callers 6

mutex_pool_mutexFunction · 0.70
hash_thread_idFunction · 0.50
ckh_string_hashFunction · 0.50
ckh_pointer_hashFunction · 0.50
prof_bt_hashFunction · 0.50
prof_thr_node_hashFunction · 0.50

Calls 2

hash_x64_128Function · 0.70
hash_x86_128Function · 0.70

Tested by

no test coverage detected