Home | History | Annotate | Download | only in msan
      1 #if __LP64__
      2 # define SANITIZER_WORDSIZE 64
      3 #else
      4 # define SANITIZER_WORDSIZE 32
      5 #endif
      6 
      7 // This is a simplified version of GetMaxVirtualAddress function.
      8 unsigned long SystemVMA () {
      9 #if SANITIZER_WORDSIZE == 64
     10   unsigned long vma = (unsigned long)__builtin_frame_address(0);
     11   return SANITIZER_WORDSIZE - __builtin_clzll(vma);
     12 #else
     13   return SANITIZER_WORDSIZE;
     14 #endif
     15 }
     16