-
[memfd] Create support class for Linux memfd-backed region. · c9fa9fe9David 'Digit' Turner authored
This creates a new helper class to allocate memfd-backed shared memory regions with the Linux kernel. The feature has been supported since at least Linux 3.17, which is sufficient for a large number of desktop Linux and Android devices. However, only recent version of GLibc or the Android C library expose memfd_create(), so keep implementing it as a direct syscall. NOTE: There is a similar function named memfd_create() inside of src/Reactor/ExecutableMemory.cpp, but it is easier to keep them separate for now to avoid introducing subtle dependency issues in the CMakeLists.txt file. This will used in future CLs that implement Vulkan external semaphores and external memory on Linux and Android for SwiftShader. Bug: b/140419396 Change-Id: I378c34760930d8fef7d0659128ededb5227c323f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35128Reviewed-by:Nicolas Capens <nicolascapens@google.com> Tested-by:
David Turner <digit@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
c9fa9fe9
×