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

python - argument must be rect style object - Pygame -

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

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