Skip to content

Instantly share code, notes, and snippets.

@Qiuzhuang
Forked from le0pard/getconf.sh
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qiuzhuang/5851472cca5a76beea94 to your computer and use it in GitHub Desktop.
Save Qiuzhuang/5851472cca5a76beea94 to your computer and use it in GitHub Desktop.
#!/bin/bash
# simple shmsetup script
page_size=`getconf PAGE_SIZE`
phys_pages=`getconf _PHYS_PAGES`
shmall=`expr $phys_pages / 2`
shmmax=`expr $shmall \* $page_size`
echo kernel.shmmax = $shmmax
echo kernel.shmall = $shmall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment