From f0492d45aa31e32f8a04b13b7bf53e0161e1afb6 Mon Sep 17 00:00:00 2001 From: Brian Geffon Date: Mon, 27 Aug 2018 17:20:36 -0700 Subject: Add /proc/sys/kernel/shm[all,max,mni]. PiperOrigin-RevId: 210459956 Change-Id: I51859b90fa967631e0a54a390abc3b5541fbee66 --- pkg/abi/linux/shm.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkg/abi/linux') 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 { -- cgit v1.2.3