You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
374 B
16 lines
374 B
#if __LP64__
|
|
# define SANITIZER_WORDSIZE 64
|
|
#else
|
|
# define SANITIZER_WORDSIZE 32
|
|
#endif
|
|
|
|
// This is a simplified version of GetMaxVirtualAddress function.
|
|
unsigned long SystemVMA () {
|
|
#if SANITIZER_WORDSIZE == 64
|
|
unsigned long vma = (unsigned long)__builtin_frame_address(0);
|
|
return SANITIZER_WORDSIZE - __builtin_clzll(vma);
|
|
#else
|
|
return SANITIZER_WORDSIZE;
|
|
#endif
|
|
}
|