VincentWei / minigui-docs

Documents for MiniGUI Core and MiniGUI Components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

没有文档说明 MG_RUNTIME_TMPDIR 如何使用

steprun opened this issue · comments

没有文档说明 MG_RUNTIME_TMPDIR 用法, 是否可以补充?

This is an environment variable for internal use. It only works when the underlying operating system does not support shm_open or memfd_create system call. It is used in the internal utility function __mg_create_anonymous_file to create an anonymous file in a temp directory which can be mapped among processes to shared the pixels in a buffer.

Generally, you can set this environment variable to /tmp, if your system has not shm_open or memfd_create. But on a system on Linux, you have no way to fall in this situation.