If you need to increase shmmax or a similar parameter in the Darwin (Os X) kernel edit the file:

/System/Library/StartupItems/SystemTuning/SystemTuning

You are looking for lines like:

sysctl -w kern.sysv.shmmax=4194304
    sysctl -w kern.sysv.shmmin=1
    sysctl -w kern.sysv.shmmni=32
    sysctl -w kern.sysv.shmseg=8
    sysctl -w kern.sysv.shmall=1024