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

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

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -