libhfuzz/files: prefault the mmap'd memory
@@ -290,9 +290,16 @@ int files_getTmpMapFlags(int flag, bool nocore) {
flag |= MAP_NOSYNC;
#endif /* defined(MAP_NOSYNC) */
#if defined(MAP_HASSEMAPHORE)
- flag |= MAP_HASSEMAPHORE;
/* Our shared/mmap'd pages can have mutexes in them */
+ flag |= MAP_HASSEMAPHORE;
#endif /* defined(MAP_HASSEMAPHORE) */
+ /* Avoid mapping the memory lazily */
+#if defined(MAP_PREFAULT_READ)
+ flag |= MAP_PREFAULT_READ;
+#endif /* defined(MAP_PREFAULT_READ) */
+#if defined(MAP_POPULATE)
+ flag |= MAP_POPULATE;
+#endif /* defined(MAP_POPULATE) */
if (nocore) {
#if defined(MAP_CONCEAL)
flag |= MAP_CONCEAL;
