public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Where are SHMMIN and SHMMAX of shmget(2) defined?
@ 2021-04-12 17:27 Peng Yu
  2021-04-12 18:28 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Yu @ 2021-04-12 17:27 UTC (permalink / raw)
  To: libc-help

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'

-- 
Regards,
Peng

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Where are SHMMIN and SHMMAX of shmget(2) defined?
  2021-04-12 17:27 Where are SHMMIN and SHMMAX of shmget(2) defined? Peng Yu
@ 2021-04-12 18:28 ` Adhemerval Zanella
  0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2021-04-12 18:28 UTC (permalink / raw)
  To: Libc-help



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))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-12 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 17:27 Where are SHMMIN and SHMMAX of shmget(2) defined? Peng Yu
2021-04-12 18:28 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).