Allow to set kern.ipc.shmmax from /boot/loader.conf.
MFC after: 1 week
This commit is contained in:
parent
95208e20d0
commit
12075c0936
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231195
@ -891,14 +891,14 @@ shminit()
|
||||
printf("kern.ipc.shmmaxpgs is now called kern.ipc.shmall!\n");
|
||||
#endif
|
||||
TUNABLE_ULONG_FETCH("kern.ipc.shmall", &shminfo.shmall);
|
||||
|
||||
/* Initialize shmmax dealing with possible overflow. */
|
||||
for (i = PAGE_SIZE; i > 0; i--) {
|
||||
shminfo.shmmax = shminfo.shmall * i;
|
||||
if (shminfo.shmmax >= shminfo.shmall)
|
||||
break;
|
||||
if (!TUNABLE_ULONG_FETCH("kern.ipc.shmmax", &shminfo.shmmax)) {
|
||||
/* Initialize shmmax dealing with possible overflow. */
|
||||
for (i = PAGE_SIZE; i > 0; i--) {
|
||||
shminfo.shmmax = shminfo.shmall * i;
|
||||
if (shminfo.shmmax >= shminfo.shmall)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TUNABLE_ULONG_FETCH("kern.ipc.shmmin", &shminfo.shmmin);
|
||||
TUNABLE_ULONG_FETCH("kern.ipc.shmmni", &shminfo.shmmni);
|
||||
TUNABLE_ULONG_FETCH("kern.ipc.shmseg", &shminfo.shmseg);
|
||||
|
Loading…
Reference in New Issue
Block a user