brintos

brintos / llvm-project-archived public Read only

0
0
Text · 283 B · 05a8513 Raw
14 lines · c
1#include <stdint.h>2 3uintptr_t get_high_bits(void *ptr) {4  uintptr_t address_bits = 56;5  uintptr_t mask = ~((1ULL << address_bits) - 1);6  uintptr_t ptrtoint = (uintptr_t)ptr;7  uintptr_t high_bits = ptrtoint & mask;8  return high_bits;9}10 11int main() {12  return 0; // break here13}14