Linux shared memory

A function that creates shared memory in * inux programming takes a key as one of its parameters.

What is the meaning of this key? And how can I use it?

Edit:

Non shared memory identifier

+3
source share
2 answers

This is simply a System V IPC (interprocess communication) key, so different processes can create or join the same shared memory block. Typically, a key is created with a help ftok()that turns a fully-qualified file name and project identifier into a useful key.

( , ), (, , , ).

, - , , lex/yacc, ( ). , , .

, . , IPC.

+4

posix (shm_open friends) , , .

, , /dev/shm Linux, mmap MAP_SHARED, .

0

Source: https://habr.com/ru/post/1744936/


All Articles