# %shmget() function

The %shmget() function creates a shared
memory segment and returns a shared memory identifier.

**For Windows:**Not Supported

## Syntax

```
shmid = %shmget(key, size, shmflg)
```

## Description

Valid values for *key* and *shmflg* are defined in shm.h and ipc.h. See
the UNIX system documentation.

## See also

- [%shmat() function](https://d3codex.com/pickbasic-flashbasic/percent-shmat-function/)
- [%shmdt() function](https://d3codex.com/pickbasic-flashbasic/percent-shmdt-function/)
- [FlashBASIC C functions overview](https://d3codex.com/pickbasic-flashbasic/flashbasic-c-functions-overview/)
- [cfunction statement](https://d3codex.com/pickbasic-flashbasic/cfunction-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/percent-shmget-function/ - part of the D3Codex reference.
