c++ - Shared memory or named pipes in ram? -
I want to communicate between two different programs. A revised environment program that gives information to the output and my own program that reads this information.
I have read about designated pipes and shared memory. But for me it is not clear where the data is stored. Due to the fact that I will exchange a lot of data, I do not want to write this data all the time on the disk. I am using a raspberry p and the SD card should be for some more time;)
The basic question is: Can the methode exchange information on the other end without being written to disk is? I'm not sure the shared memory is written on RAM, I want to make it clear. As I have read about another idea / dev / shm which should be a RAM disc. Can I use designated pipes for this place and what is the information about being saved in Ram?
What's the best way? Thanksgiving :)
shared memory and named pipes (and Unix domain sockets) will not write sdcard for you IPC As long as you do not allocate more memory than available physical RAM, which is 256 MB or 512 MB depending on your raspberry model. If you do this then it will start swapping and will probably slow down.
Comments
Post a Comment