In this thread the OP is suggested to use mmap()
instead of shmget()
to get shared memory in Linux.
I visited this page and this page to get some documentation, but the second one gives an obscure example regarding mmap()
.
Being almost a newbie, and needing to share some information (in text form) between two processes, should I use the shmget()
method or mmap()
? And why?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…