I cannot find a library for non-persisted memory-mapped files in Linux for C++. I searched for a while to find any library but there is nothing is there any reason why this does not exist in Linux and what would work instead of non-persisted memory-mapped files to share memory between two programs. Thanks in advance.
There is no need for a library. This is directly supported by the POSIX standard.
Use MAP_ANONYMOUS
on mmap
:
The mapping is not backed by any file; its contents are initialized to zero.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.