
October 23rd, 2008, 08:36 AM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 3
Time spent in forums: 45 m 45 sec
Reputation Power: 0
|
|
PHP5 extension with shared memory under linux
Hi Codewalkers.
Under Windows XP, I've written a PHP extension which uses a unique FIFO queue on the heap. This queue must be read and written by requests from every client. (For company internal reasons, a database is not an alternative.)
Under Windows everything works fine because we've got only one running apache process.
Under Linux, apache2 forks its master process into a couple of children, each with its own memory - so, the FIFO queue is not unique anymore but copied into those child processes.
Here my question:
Does the ZEND engine provide any easy way to put my queue in a shared memory incl. safe read/write operations?
Thanks for thinking and answering,
Burkhard
p.s.: I'm using:
Linux 2.6.24-21-generic
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch
|