File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,23 @@ using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
68
68
#else
69
69
# if SANITIZER_FUCHSIA || defined(__powerpc64__)
70
70
const uptr kAllocatorSpace = ~(uptr)0 ;
71
+ # if SANITIZER_RISCV64
72
+ // See the comments in compiler-rt/lib/asan/asan_allocator.h for why these
73
+ // values were chosen.
74
+ const uptr kAllocatorSize = UINT64_C(1 ) << 33 ; // 8GB
75
+ using LSanSizeClassMap = SizeClassMap</* kNumBits=*/ 2 ,
76
+ /* kMinSizeLog=*/ 5 ,
77
+ /* kMidSizeLog=*/ 8 ,
78
+ /* kMaxSizeLog=*/ 18 ,
79
+ /* kNumCachedHintT=*/ 8 ,
80
+ /* kMaxBytesCachedLog=*/ 10 >;
81
+ static_assert (LSanSizeClassMap::kNumClassesRounded <= 32 ,
82
+ " 32 size classes is the optimal number to ensure tests run "
83
+ " effieciently on Fuchsia." );
84
+ # else
71
85
const uptr kAllocatorSize = 0x40000000000ULL ; // 4T.
72
86
using LSanSizeClassMap = DefaultSizeClassMap;
87
+ # endif
73
88
# elif SANITIZER_RISCV64
74
89
const uptr kAllocatorSpace = ~(uptr)0 ;
75
90
const uptr kAllocatorSize = 0x2000000000ULL ; // 128G.
You can’t perform that action at this time.
0 commit comments