http://stackoverflow.com – When we run the java program just after the reboot, jvm is allocation 4095*902180 bytes shm segments but it doesn't release it. So keeps on creating these shm segments and it makes other scripts to abort with message "can't allocate shared memory anymore." Following is the output of ipcs command when the jvm session is running. This happens only in the first jvm session after the system reboot. (HowTos)