Subject: Re: SysV SHM never removed
To: Julian Coleman <>
From: Bill Sommerfeld <>
List: current-users
Date: 02/12/2000 11:43:41
> I've turned the game netmaze into a package.  It uses shmget().
> Unfortunately, I can only run it so many times before I get the error :
>   shmget: Cannot allocate memory
> The only way to clear this is to reboot.

Not a bug in the implementation -- it's a "feature" of the the
API... :-) SysV shared memory segments outlast the programs which
create them.

This sounds like an application bug -- it should probably be storing
the ID of the shared memory segment in a file in /var/games or some
such and recycling it from run to run if it already exists..

As Thilo mentioned in his mail, you can use ipcs and ipcrm to delete
them manually.

					- Bill