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

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -