MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / mi_ptr_encode

Function mi_ptr_encode

system/lib/mimalloc/include/mimalloc/internal.h:1036–1039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1034}
1035
1036static inline mi_encoded_t mi_ptr_encode(const void* null, const void* p, const uintptr_t* keys) {
1037 uintptr_t x = (uintptr_t)(p==NULL ? null : p);
1038 return mi_rotl(x ^ keys[1], keys[0]) + keys[0];
1039}
1040
1041static inline uint32_t mi_ptr_encode_canary(const void* null, const void* p, const uintptr_t* keys) {
1042 const uint32_t x = (uint32_t)(mi_ptr_encode(null,p,keys));

Callers 2

mi_ptr_encode_canaryFunction · 0.85
mi_block_set_nextxFunction · 0.85

Calls 1

mi_rotlFunction · 0.85

Tested by

no test coverage detected