note 10592 added to Shared Memory Functions

From: Date: Thu, 11 Jan 2001 20:16:49 +0000
Subject: note 10592 added to Shared Memory Functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-9664@lists.php.net to get a copy of this message
The idea behind SHMOP is an easy to use shared memory interface, without any additional headers added to the shared memory segment or requiring any special special controls to access the shared memory segment outside of PHP. SHMOP borrows its api from C's api to shm, which makes it very easy to use, because it treats shared memory, like C, as a file of sorts. This makes it very easy to use even for novices, due to this functionality. Most importantly SHMOP uses shm segments to store raw data, which means you don't need to worry about matching headers, etc... when you are using C, perl or other programming languages to open/create/read/write shm segments that were create or are going to be used by PHP. In this it differs from sysvshm, who's shm interface uses a specialized header, which resides inside the shared memory segment this adds an unnecessary level of difficulty when you want to access php shm from external programs. Also, from my personal tests in Linux 2.2/2.4 and FreeBSD 3.3 SHMOP is about 20% faster then sysvshm, mostly due to fact it does not need to parse the specialized header and stores the data in raw form. http://www.php.net/manual/ref.shmop.php

« previous php.notes (#9664) next »