[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'ipc' (#rtl)


Return the ID of a shared memory block, possibly creating it


Source position: ipc.pp line 417

function shmget(

  key: TKey;

  size: size_t;

  flag: cint



shmget returns the ID of a shared memory block, described by key. Depending on the flags in flag, a new memory block is created.

flag can have one or more of the following values (combined by ORs):

The queue is created if it doesn't already exist.
If used in combination with IPC_CREAT, causes the call to fail if the queue already exists. It cannot be used by itself.

Optionally, the flags can be ORed with a permission mode, which is the same mode that can be used in the file system.

if a new memory block is created, then it will have size Size bytes in it.


On error, -1 is returned, and IPCError is set.

Documentation generated on: May 14 2021