diff options
author | Brian Geffon <bgeffon@google.com> | 2018-08-27 17:20:36 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-27 17:21:37 -0700 |
commit | f0492d45aa31e32f8a04b13b7bf53e0161e1afb6 (patch) | |
tree | 78ef1626271ba6c96e0482c2e19874774887aa3b /pkg/abi/linux | |
parent | 0923bcf06bffe0216cd685f49e83a07201d48cc3 (diff) |
Add /proc/sys/kernel/shm[all,max,mni].
PiperOrigin-RevId: 210459956
Change-Id: I51859b90fa967631e0a54a390abc3b5541fbee66
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r-- | pkg/abi/linux/shm.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/abi/linux/shm.go b/pkg/abi/linux/shm.go index 9149ed094..f50b3c2e2 100644 --- a/pkg/abi/linux/shm.go +++ b/pkg/abi/linux/shm.go @@ -14,6 +14,8 @@ package linux +import "math" + // shmat(2) flags. Source: include/uapi/linux/shm.h const ( SHM_RDONLY = 010000 // Read-only access. @@ -38,6 +40,15 @@ const ( SHM_INFO = 14 ) +// SHM defaults as specified by linux. Source: include/uapi/linux/shm.h +const ( + SHMMIN = 1 + SHMMNI = 4096 + SHMMAX = math.MaxUint64 - 1<<24 + SHMALL = math.MaxUint64 - 1<<24 + SHMSEG = 4096 +) + // ShmidDS is equivalent to struct shmid64_ds. Source: // include/uapi/asm-generic/shmbuf.h type ShmidDS struct { |