- 论坛徽章:
- 0
|
共享内存shmmax的数值换算
sem.h defines how shared memory is to be used: The number of semaphore identifiers, number of semaphores per ID, max total semaphores, max number of operations per semop call, etc. Oracle is concerned primarily with the numer of semaphores per ID. In order to achieve the results that follow:
#define SEMMNI 128 ? max # of semaphore identifiers
#define SEMMSL 512 <= 512 max num of semaphores per id
#define SEMMNS (SEMMNI*SEMMSL) ? max # of semaphores in system
#define SEMOPM 100 ~ 100 max num of ops per semop call
#define SEMVMX 196608 semaphore maximum value |
|