Where are SHMMIN and SHMMAX of shmget(2) defined?
Adhemerval Zanella
adhemerval.zanella@linaro.org
Mon Apr 12 18:28:04 GMT 2021
On 12/04/2021 14:27, Peng Yu via Libc-help wrote:
> Hi,
>
> shmget(2) mentions SHMMIN and SHMMAX.
>
> But I don't see where they are defined and what their values are. Does
> anybody know where they are defined?
>
> gcc -E -dD - <<< '#include <sys/shm.h>' | grep 'SHMMAX\|SHMMIN'
>
They are provided by the kernel headers since it is system specific
and glibc does not define them as extensions:
| $ gcc -E -dD - <<< '#include <linux/shm.h>' | grep 'SHMMAX\|SHMMIN'
| #define SHMMIN 1
| #define SHMMAX (ULONG_MAX - (1UL << 24))
More information about the Libc-help
mailing list