]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
memcheck/tests/sh-mem-random.c: Set huge_addr to 240GB
authorMark Wielaard <mark@klomp.org>
Tue, 24 Dec 2024 18:11:17 +0000 (19:11 +0100)
committerMark Wielaard <mark@klomp.org>
Wed, 25 Dec 2024 18:22:29 +0000 (19:22 +0100)
https://www.kernel.org/doc/html/next/riscv/vm-layout.html
Says RISC-V Linux Kernel SV39 user-space virtual memory ends at 256GB.
So try at 240GB. This seems a reasonable value for other arches too.

https://bugs.kde.org/show_bug.cgi?id=468575#c78

memcheck/tests/sh-mem-random.c

index ae82248ae6902ec8a67e1981c2c6fa7db89ddc68..0e01684acb6195b676e0e40338c5e5521e572a44 100644 (file)
@@ -247,7 +247,10 @@ int main(void)
       int nbytes_p;
       // (U1*)(UWord)constULL funny casting to keep gcc quiet on
       // 32-bit platforms
-      U1* huge_addr = (U1*)(UWord)0x6600000000ULL;  // 408GB
+      // https://www.kernel.org/doc/html/next/riscv/vm-layout.html
+      // Says RISC-V Linux Kernel SV39 user-space virtual memory
+      // ends at 256GB. So try at 240GB.
+      U1* huge_addr = (U1*)(UWord)0x3c00000000ULL;  // 240GB
       // Note, kernel 2.6.? on Athlon64 refuses fixed mmap requests
       // at above 512GB.