POSIX Shared memory -


what difference between:

  1. shm_open("test")
  2. mmap()
  3. close()
  4. munmap()
  5. shm_unlink()

and:

  1. open("/dev/shm/test")
  2. mmap()
  3. close()
  4. munmap()
  5. unlink()

the difference see second options not need link -lrt

it same thing except shm_open(test) posix standard , needs librt library, , open(/dev/shm/test) not posix standard , not need librt library. performance equal both solution.


Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -