diff --git a/libhfcommon/files.c b/libhfcommon/files.c index 5a7763ec9..d0fa72ce0 100644 --- a/libhfcommon/files.c +++ b/libhfcommon/files.c @@ -347,6 +347,9 @@ int files_createSharedMem(size_t sz, const char* name, bool exportmap) { } #if defined(_HF_ARCH_LINUX) + if (fd == -1) { + fd = syscall(__NR_memfd_create, name, (uintptr_t)(MFD_CLOEXEC | MFD_HUGETLB)); + } if (fd == -1) { fd = syscall(__NR_memfd_create, name, (uintptr_t)(MFD_CLOEXEC)); }