Re: Shared memory in extensions

From: Date: Tue, 03 Apr 2001 08:14:39 +0000
Subject: Re: Shared memory in extensions
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-50661@lists.php.net to get a copy of this message
Alexander! You're absolutely right - that was exactly what I had done! Hmm I guess that at his point I have noone fooled :) I'm totally new to all this shm stuff and PHP extensions or rather the intrinsic details of their 'inner' workings... I simply figured that if I allocate a shared memory segment in PHP_MINIT_FINCTION then it should be destroyed in PHP_MSHUTDOWN_FUNCTION. The error I did (I reckon) was to compile and replace the PHP-module before restarting apache. This way the new PHP_MSHUTDOWN_FUNCTION was called before PHP_MINIT_FUNCTION. Where can I find a good explanation as to what the differences are between MINIT, RINIT, MSHUTDOWN and RSHUTDOWN? hehe - how would one go about removing a shared memory segment manually?? Well thank you all (Alexander in particular) for your answers they helped alot Thomas Alexander Feldman wrote: > > Hi Thomas, > > I tried to create a shared segment of size 5 megabytes in the > PHP_MINIT_FUNCTION and I had no problems. > > The situation you described seems as you have called shmctl with IPC_RMID > but not everyone had detached from the segment. Then you tried to use > shmget and it failed - remove manually the shared memory segment and try > again. > > -- > Alexander Feldman > Zend Technologies Ltd. > phone: +972 3 6139665 ext. 113, fax: +972 3 6139671 > http://www.zend.com/ >

« previous php.dev (#50661) next »