以下是基于BSD OS的共享内存ipc内核参数。
shmall: Maximum total size of shared memory in pages (normally 4096 bytes)
shmmax: Maximum size of shared memory segment in bytes
shmmin: min shared memory segment size
shmmni: max number of shared memory identifiers
shmseg: max shared memory segments per process
kern.ipc.shmkqmax: 64
kern.ipc.shm_allow_removed: 0
kern.ipc.shm_use_phys: 0
kern.ipc.shmall: 17408
kern.ipc.shmseg: 512
kern.ipc.shmmni: 512
kern.ipc.shmmin: 1
kern.ipc.shmmax: 71303168
是否有任何参数可以找出已分配/正在使用的shm内存?
感谢。
答案 0 :(得分:0)
使用sysctl
变量kern.ipc.shmsegs
;
> sysctl -d kern.ipc.shmsegs
kern.ipc.shmsegs: Current number of shared memory segments allocated