Re: shared memory: shm_has_var

From: Date: Mon, 11 Dec 2000 17:24:20 +0000
Subject: Re: shared memory: shm_has_var
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-40870@lists.php.net to get a copy of this message
On Mon, 11 Dec 2000, Stanislav Malyshev wrote: > IV>> Is there any script-level method of doing it? > > Script-level? You have to base on PHP functions anyway, so I fear you've > lost me here - what you are using as built-in and what you want to do on > script-level? > Well, the original question was (not really) in the (very) general vicinity of using the shm_* functions to reserve and attach to shared memory segments. Then the question was brought up as to why these reserved segments aren't released when Apache is restarted. shm_* are script-level functions, and the methods you're talking about are engine-level functions. Now, PHP_MINIT() and its brethren aren't accesible from scripts, so there doesn't seem to be a way to do it within a script. My reasoning is that since it is an OS-level detail and scripts only get executed when you access their URI, then the scripts will never get a chance to release the segment when Apache is shut down. Maybe a fix would be to have some sort of web-server-level shared memory support as well. Most people don't need the OS-level stuff anyway for programs outside of the PHP engine; they just need something that can survive execution of the script. -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.dev (#40870) next »