MCPcopy Create free account
hub / github.com/cinit/TMoe / testMemfdSupport

Function testMemfdSupport

app/src/main/cpp/utils/shared_memory.cpp:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static bool testMemfdSupport() {
58 int fd = (int) syscall(__NR_memfd_create, "test_support_memfd", MFD_CLOEXEC | MFD_ALLOW_SEALING);
59 if (fd == -1) {
60 return false;
61 }
62 if (fcntl(fd, F_ADD_SEALS, F_SEAL_FUTURE_WRITE) == -1) {
63 close(fd);
64 return false;
65 }
66 close(fd);
67 return true;
68}
69
70bool has_memfd_support() {
71 /*

Callers 1

has_memfd_supportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected