File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,18 @@ class SizeClassAllocator64 {
113
113
// ~(uptr)0.
114
114
void Init (s32 release_to_os_interval_ms, uptr heap_start = 0 ) {
115
115
uptr TotalSpaceSize = kSpaceSize + AdditionalSize ();
116
+
117
+ uptr MaxAddr = GetMaxUserVirtualAddress ();
118
+ // VReport does not call the sanitizer allocator.
119
+ VReport (3 , " Max user virtual address: 0x%zx\n " , MaxAddr);
120
+ VReport (3 , " Total space size for primary allocator: 0x%zx\n " ,
121
+ TotalSpaceSize);
122
+ if (TotalSpaceSize >= MaxAddr)
123
+ VReport (0 , " Error: heap size %zx exceeds max user virtual address %zx\n " ,
124
+ TotalSpaceSize, MaxAddr);
125
+ // We can't easily adjust the requested heap size, because kSpaceSize is
126
+ // const (for optimization) and used throughout the code.
127
+
116
128
PremappedHeap = heap_start != 0 ;
117
129
if (PremappedHeap) {
118
130
CHECK (!kUsingConstantSpaceBeg );
You can’t perform that action at this time.
0 commit comments