Skip to content

Commit 9b747cd

Browse files
committed
Clarify warning
1 parent 7925732 commit 9b747cd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ class SizeClassAllocator64 {
119119
VReport(3, "Max user virtual address: 0x%zx\n", MaxAddr);
120120
VReport(3, "Total space size for primary allocator: 0x%zx\n",
121121
TotalSpaceSize);
122-
if (TotalSpaceSize >= MaxAddr)
122+
if (TotalSpaceSize >= MaxAddr) {
123+
// We can't easily adjust the requested heap size, because kSpaceSize is
124+
// const (for optimization) and used throughout the code.
123125
VReport(0, "Error: heap size %zx exceeds max user virtual address %zx\n",
124126
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-
127+
VReport(
128+
0, "Try using a kernel that allows a larger virtual address space\n");
129+
}
128130
PremappedHeap = heap_start != 0;
129131
if (PremappedHeap) {
130132
CHECK(!kUsingConstantSpaceBeg);

0 commit comments

Comments
 (0)