Strengthen valgrind checks

This commit is contained in:
2024-06-14 22:31:05 -07:00
parent e4a77c88d8
commit b34d559c02

View File

@@ -263,7 +263,7 @@ struct MemManager {
if (next == firstUnaddressable) {
mprotectSafe(base + firstUnaddressable, kUpsizeBytes,
PROT_READ | PROT_WRITE);
VALGRIND_MAKE_MEM_UNDEFINED(base + firstUnaddressable, kUpsizeBytes);
VALGRIND_MAKE_MEM_NOACCESS(base + firstUnaddressable, kUpsizeBytes);
firstUnaddressable += kUpsizeNodes;
#if SHOW_MEMORY
mmapBytes = getBytes();
@@ -278,6 +278,7 @@ struct MemManager {
}
}
VALGRIND_MAKE_MEM_UNDEFINED(base + next, sizeof(Node));
return next++;
}
@@ -1682,4 +1683,4 @@ int main() {
}
#endif
// GCOVR_EXCL_STOP
// GCOVR_EXCL_STOP