★ wanayoo — archive 1999 http://www.php.net/manual/function.shm-remove.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Semaphore
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Semaphore
* sem_get
* sem_acquire
* sem_release
* shm_attach
* shm_detach
* shm_remove
* shm_put_var
* shm_get_var
* shm_remove_var
Manual: shm_remove
View the source code for this pageSearch the site



Previous page
 shm_detach
 Updated
Sat, 12 Aug 2000
shm_put_var 
Next page


shm_remove

(PHP3 >= 3.0.6, PHP4 )

shm_remove -- Removes shared memory from Unix systems

Description

int shm_remove (int shm_identifier)

Removes shared memory from Unix systems. All data will be destroyed.


User Contributed Notes: shm_remove


cu@ulakbim.gov.tr
29-Dec-1999 08:30
Though it says **shm_identifier** in
<PRE>
int shm_remove(int shm_identifier);
</PRE>
and
<PRE>
shm_attach() returns an **id** that that can be used to access the System V...
</PRE>
a snippet like this:
<PRE>
$key = 1234;
$shm=shm_attach($key);
// do whatever...
shm_remove($shm);
</PRE>
produces an error like
Warning: 2(which is the value of $shm) is not a existing SysV shared memory key in /usr/cu/web/sema.php on line 44...
The documentation confused me a bit. I thought shm_remove would get the shm handle/id that returns from shm_attach, not the key given to shm_attach. So, use instead:
<PRE>
shm_remove($key);
</PRE>
which is what is intended indeed.



 About Notes


Previous page
 shm_detach
 Updated
Sat, 12 Aug 2000
shm_put_var 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.