I'm just wondering where these values are being set and what they default to? Mine is currently 18446744073692774399. I didn't set it anywhere that I can see.
$ cat /proc/sys/kernel/shmmax
18446744073692774399
$ sysctl kernel.shmmax
kernel.shmmax = 18446744073692774399
Best Answer
The
__init
functionipc_ns_init
sets the initial value ofshmmax
by callingshm_init_ns
, which sets it to the value of theSHMMAX
macro.The definition of
SHMMAX
is in<uapi/linux/shm.h>
:On 64-bit machines, that definition equals the value you found,
18446744073692774399
.