Attach a shared memory block.
Source position: ipc.pp line 427
function shmat( |
shmid: cint; |
shmaddr: pointer; |
shmflg: cint |
):pointer; |
shmat attaches a shared memory block with identified shmid to the current process. The function returns a pointer to the shared memory block.
If shmaddr is Nil, then the system chooses a free unmapped memory region, as high up in memory space as possible.
If shmaddr is non-nil, and SHM_RND is in shmflg, then the returned address is shmaddr, rounded down to SHMLBA. If SHM_RND is not specified, then shmaddr must be a page-aligned address.
The parameter shmflg can be used to control the behaviour of the shmat call. It consists of a ORed combination of the following constants:
For an example, see shmctl.
If an error occurs, -1 is returned, and IPCerror is set.
|
Return the ID of a shared memory block, possibly creating it. |
|
|
Detach shared memory block. |
|
|
Perform control operations on a shared memory block. |